Quoted By:
Ganesha isn't an elephant. Even his head isn't really an elephants head.
He is the son of Shiva and Parvati. They have a home, Mount Kailasha. Shiva leaves the home often to go on adventures. Often times when he goes on these adventures he meets different characters that challenge him (intellectually or physically). Sometimes these characters win (they outwit him) and get some kind of boon from him.
Often times physical fights ensue and Shiva obviously wins, and then the character he defeats join him. The amount of people that follow him sooner or later become his army - they are also called Ganas.
The leader of the Ganas is called Nandi. He is a waterbuffalo. Once upon a time, when Shiva returns home from a long journey - His wife has given birth to a son he doesn't know of. His wife is taking a bath and tells her son to protect her from any onlookers - and Ganesha obliges.
Shiva returns and wants to see his wife , but Ganesha denies him passage. Shiva gets angry and a fight ensues. Shiva beheads his own son.
Nandi realizing the mistake Shiva has made , offers his own head to right his friend (and masters) wrong - thus Ganesha gets the head of the leader of the Ganas. Thats why he is called GANAPATI.
Lord of the Ganas.
So according to this story, the head should be that of a bull, not an elephant.
But there is another version where an elephant offers his head , which became more common.