Loss of the sense of smell can be due to a number of things including swelling within the nose that prevents odors from gaining access to the olfactory (smell) area. The swelling may be from a cold or allergy. Head trauma is also a cause of anosmia.
Most people with anosmia have normal perception of salty, sweet, sour, and bitter substances but they lack flavor discrimination, which is largely dependent on olfaction (smell). Therefore, they often complain of losing the sense of taste (ageusia).