Lord Ram supported by Hanuman and his monkey army reached Lanka to rescue his wife Sita. Lord Brahma told Rama to pray Devi Durga and get her blessings to defeat Ravana. On the other hand Ravana in the greed of Immortality started doing prayer to Devi Durga for her blessings.
Lord Brahma told Ram to present One Hundred Eight Neelkamals (Blue Lotuses) for the blessings of Devi Durga. Ravana with his bad spiritual powers theft one NeelKamal to disturb the Yagna. When Lord Rama seen that there is one NeelKamal missing then he thought that without this one NeelKamal the worship of Devi Durga is incomplete, so he thought that he should offer his one eye to Devi Durga which resembled the NeelKamal (Blue lotus). Devi was pleased on his devotion and appeared before him and blessed him for the battle.
The battle was started on the day of "Saptami". Ravana was finally defeated after a long aggressive fighting and was killed at the time of "Sandikhshan"(the transition period of "Ashtami" to "Navami"). He was cremated on "Dashami".