According to ancient legends, she was born a daughter of Katyayana Rishi, born in the Katya lineage originating from Vishwamitra, thus called Katyayani, “daughter of Katyayana”. Elsewhere in texts like Kalika Purana, it is mentioned that it was Rishi Kaytyayana who first worshipped her, hence she came to known as Katyayani. In either case, she is a demonstration or apparition of the Durga and is worshipped on the sixth day of Navratri festival.
Devi Mahatmya in Sanskrit, the central text of Shaktism, dated 11 CE
The Vamana Purana mentions the legend of her creation in great detail: “When the gods had sought Vishnu in their distress, he and at his command Shiva, Brahma and the other gods, emitted such flames from their eyes and countenances that a mountain of effulgence was formed, from which became manifest Katyayini, refulgent as a thousand suns, having three eyes, black hair and eighteen arms. Shiva gave her his trident, Vishnu a Sudarshan Chakra or discus, Varuna a shankha, a conch-shell, Agni a dart, Vayu a bow, Surya a quiver full of arrows, Indra a thunderbolt, Kuvera a mace, Brahma a rosary and water-pot, Kala a shield and sword, Visvakarma a battle-axe and other weapons. Thus armed and adored by the gods, Katyayani proceeded to the Mysore hills. There, the asuras saw her and captivated by her beauty they so described her to Mahishasura, their king, that he was anxious to obtain her. On asking for her hand, she told him she must be won in fight. He came and fought; at length Durga dismounted from her lion, and sprang upon the back of Mahisha, who was in the form of a buffalo and with her tender feet so smote him on the head that he fell to the ground senseless, when she cut off his head with her sword and hence was called Mahishasuramardini, the Slayer of Mahishasura., the legend also finds mention in Varaha Purana and the classical text of Shaktism, the Devi-Bhagavata Purana