In ancient times the demon Mahishasura performed severe penance and obtained a boon from Lord Brahma that no god or demon could defeat him. Empowered by this boon he conquered the three worlds — Swarga, Prithvi and Patala — and drove the Devas out of heaven.
The Devas, humiliated and helpless, approached the Trinity — Brahma, Vishnu and Mahesh. Enraged at Mahishasura's tyranny, the three gods and all the Devas released their divine radiance (tejas). From that blazing light emerged Maa Durga — the supreme Shakti, of incomparable beauty and power.
Each deity bestowed his own weapon upon her: Shiva the trishul, Vishnu the Sudarshan Chakra, Brahma the kamandal and the Vedas, Indra the vajra, Varuna the shankh, Agni the spear, Vayu the bow and arrows, Yama the danda, and the Himalaya the lion as her mount.
Thus armed and riding her lion, Maa Durga challenged Mahishasura. A terrible battle raged for nine days and nine nights. Mahishasura kept changing forms — buffalo, lion, elephant, warrior — to confuse the Goddess, and one by one she destroyed his generals.
On the tenth day, as Mahishasura took the form of a great buffalo, Maa Durga leapt upon him, pinned him with her foot and pierced his chest with the trishul, ending his reign. The heavens rejoiced, the Devas showered flowers, and Dharma was restored.
This is why the nine nights are called Navratri (nine nights) and the tenth day is Vijayadashami, the day of victory. The same katha from the Devi Mahatmya (Markandeya Purana) is recited in both Chaitra and Sharad Navratri; in Chaitra it closes with Rama Navami, the birthday of Lord Rama.