The ritual world of Hinduism (manifestations of which differ greatly amongst regions, villages, and individuals) offers a number of common features that link all Hindus into a greater Indian religious system, and influences other religions as well.
The most notable feature in religious ritual is the division between purity and pollution. Religious acts presuppose some degree of impurity or defilement for the practitioner, which must be overcome or neutralized before or during ritual procedures. Purification, usually with water, is a typical feature of most religious actions. Avoidance of the impure - taking animal life, eating flesh, proximity to dead things or bodily fluids - is another feature of Hindu ritual and is important for repressing pollution.
When Shiva returned home Vinayak did not allow him to enter. After a brief argument, Shiva beheaded Vinayak with his trishul (a kind of trident). When Parvati heard about this she cried in despair over the loss of her son. As a means to console Parvati, Shiva sent his men to the forest and instructed them to retrieve the head of the first living creature they met. Shortly, his men returned with the head of a baby elephant. With his divine powers, Shiva placed the baby elephant’s head over Vinayak's body and, in a matter of seconds, Vinayak came back to life.
After this incident, Vinayak became known as Gajaanan, which stems from the root word ‘gaj’ meaning elephant. Shiva blessed him with a boon and explained that people would first offer their love and devotion to Ganeshji before starting any auspicious activity