Though multiple versions, with varying details, exist of Hanuman’s birth, a common telling centers around a Vanara named Anjana who worshiped Shiva for a son. Pleased by Anjana’s prayer and penance, Shiva sent his divine power and blessing through Vayu (the wind god) into Anjana’s womb.
Besides making him famous as the son of Vayu, the nature of Hanuman’s conception has led many to believe he is also an avatar of Shiva. While this idea is not accepted by all Hindu schools of thought, like Shiva, Hanuman is widely considered a perfected yogi, possessing eight siddhis (“mystic perfections”), which include anima (the ability to become smaller than the smallest), mahima (the ability to become infinitely large), laghima (the ability to become lighter than air), prapti (the ability to instantly travel anywhere at will), prakamya (the ability to achieve whatever one desires), isitva (the ability to create or annihilate anything at will), vasitva (the ability to control the elements of material nature), and kamavasayita (the ability to assume any form or shape one desires).
Though Hanuman has all of these abilities, they are all byproducts of the ultimate goal of yoga, which is to connect to the Divine. Being a perfect yogi, he therefore employs them not for the satisfaction of his own senses, but in the service of the divine Rama.