The appearance and universal position of Lord Karttikeya is described in the Mahabharata (Markandeya-samasya-parva, Salyaparva and Anusasana-parva). The following is a summary: After the marriage celebration of Lord Siva and Goddess Uma, they desired to beget a child. Thereupon all the demigods became filled with anxiety because the combined potency of Lord Siva and Goddess Uma, made invincible by penance, would surely produce an immensely powerful child who might become the cause of universal destruction.
When the celestial couple were in conjugal union, the demigods requested Siva to restrain his fiery semen and not beget offspring. As master of his senses, Siva agreed to the demigods’ request, but Goddess Uma cursed them: “Since you have opposed the birth of issue from me, you therefore shall have no offspring of your own!” After some time, the demigods were harassed by the powerful demon Taraka, who, by the blessings of Lord Brahma, could not be defeated either by demigods, raksasas, or humans.
They appealed to Lord Brahma for help, explaining their difficulty in fighting with Taraka and their inability, due to Uma’s curse, to create offspring capable of defeating that demon. Lord Brahma relieved their anxiety by advising them to ask Agni to procreate a male issue who would bring the demise of the asura Taraka. (Since Agni was not among the demigods who had interrupted Lord Siva’s and Goddess Uma’s attempt to conceive a child, he was the only demigod not cursed by Uma.)