Ganesh, also known as Ganapati , Vinayaka, and Pillaiyar, is one of the deities best-known and most widely worshipped in India. Although he is known by many other attributes, Ganesha's elephant head makes him easy to identify. Ganesha is widely revered as the Remover of Obstacles and more generally as Lord of Beginnings and Lord of patron of arts and sciences, and the demigod of intellect and wisdom.
How Ganesha Got His Head
The story of the birth of this zoomorphic deity, as depicted in the Shiva Purana, goes like this: Once goddess Parvati, while bathing, created a boy out of the dirt of her body and assigned him the task of guarding the entrance to her bathroom. When Shiva, her husband returned, he was surprised to find a stranger denying him access, and struck off the boy's head in rage.
Parvati broke down in utter grief and to soothe her, Shiva sent out his squad (gana) to fetch the head of any sleeping being who was facing the north. The company found a sleeping elephant and brought back its severed head, which was then attached to the body of the boy. Shiva restored its life and made him the leader (pati) of his troops. Hence his name 'Ganapati'. Shiva also bestowed a boon that people would worship him and invoke his name before undertaking any venture.