Original: According to the narrative from the Devi Mahatmya story of the Markandeya Purana text, Durga was created as a warrior goddess to fight an asura, (an inhumane force/demon) named Mahishasur.
Simplified: According to the narrative from the Devi Mahatmya of the Markandeya Purana, the type of Durga was made as a warrior goddess to fight a demon.