Here is the story of Manifestation of Ganesha, Kartikeya (Ganesha birth story and Kartikeya’s birth story) is explained as per the Brahma Purana.
Once, before taking her bath, goddess Parvati anointed unguent on her body and while removing it created a human form from the accumulated dross. The head of this human form resembled an elephant. Parvati then playfully immersed the human-form into river Ganga. But, to her sheer amazement the human form became alive and of enormous size. She accepted him as her son and he was none other than elephant-headed deity Ganesh.
Once, Lord Shiva became so deeply fascinated by her consort. Parvati hat he did not come out from his palace for 1000 years. The deities became worried and sent Agni to find out the reason. Agni disguised himself as a parrot and entered the palace where Shiva was enjoying privacy with Parvati.
Meanwhile, Parvati went at the bank of a reservoir to quench her thirst. After reaching there she saw six divine women (matrikas) carrying water in the leaves of lotus flowers. As Parvati was thirsty, she requested them to give some water. The matrikas agreed on the condition that a son born to her (Parvati) should also have to be accepted as their son. Parvati gave her conscent. The matrikas gave Parvati water to drink.
Hardly had Parvati finished drinking water than a divine child emerged out from her womb. The child possessed various weapons like, trident, shakti and a noose in his hands. He was none other than Kartikeya.The deities appointed Kartikeya as the commander of their army. During that time, a mighty demon named Tarakasur used to torment the deities. Kartikeya killed that demon on the request of deities.