There are many causes of anosmia, it could be temporary or permanent.
Any unexplained loss of smell that lasts longer than a cold virus probably should be checked out by a doctor. See a doctor immediately if your inability to smell comes on suddenly and is accompanied by other worrisome or strange symptoms.
The treatment depends on the root cause of your condition. There is no medication or treatment specifically designed to improve or bring back your sense of smell, but finding the cause of the anosmia and resolving the underlying issue is successful in many cases. In some cases, the sense of smell may return gradually over time.