Once SHiva and Parvati were playing in the woods in the form of monkeys. Parvati became pregnant. The fetus was given to Vayu, the wind god. Vayu gave it in turn to Anjana who was doing austerities (tapas) at that time in order to obtain a son. Thus, Kunjara, the monkey chieftain, and Anjana gave birth to Hanuman.
In her previous birth Anjana was a goddess named Punjikasthala (also known as Managarva). She was born as a she-monkey, Anjana, as a result of a curse. She was redeemed from the curse and regained her original nature after the birth of Hanuman.