Ganesha is worshipped first before almost every Hindu ritual, journey or new venture, because he is believed to clear the path ahead. On Ganesh Chaturthi he is welcomed as a guest into the home, cared for with daily worship and offerings, and then lovingly sent off with the hope that he will return the next year.
Tradition holds that Ganesha was born at midday, so the installation and main worship (Ganesh Sthapana) are done during the Madhyahna Ganesh Puja Muhurat shown above. The festival also carries a well-known caution: one should not look at the Moon on this night. This page shows the time to avoid seeing the Moon for your city.
The festival has a strong community side. Public celebrations by neighbourhood groups (sarvajanik mandals) grew in the 1890s when Lokmanya Bal Gangadhar Tilak encouraged them as a way to bring people together. Today the immersion, the music and the shared prasad make it one of India's most widely celebrated festivals.
Goddess Parvati, wishing for a guard while she bathed, shaped a boy from the turmeric paste on her body and gave him life. She asked him to let no one in. When Shiva returned home, the boy, not knowing who he was, blocked the way. In the fight that followed, Shiva cut off the boy's head. Parvati was overcome with grief, and to console her Shiva promised to restore the child. His attendants brought back the head of the first creature they found, an elephant, and Shiva placed it on the boy and brought him back to life. He made him the leader of his attendants (Ganapati) and declared that he would be worshipped before all other gods.
Another story explains why the Moon is avoided on this night. Ganesha, riding his mouse after a large meal of modaks, stumbled and fell, and the Moon laughed at him. Ganesha declared that anyone who looked at the Moon on this Chaturthi would face false accusations (Mithya Dosha, also called Kalank). It is said that even Krishna, after seeing the Moon on this night, was wrongly accused of stealing the precious Syamantaka gem, and cleared his name only after recovering it.