All ways of knowledge are your aspects, O Devi; so are all women in the world, endowed with various attributes. By you alone, O Mother, this world is filled - Chandi, II, 6
Durga's story appears primarily in the Skanda Purana, in Chandi, itself a part of the Markandeya Purana, but very similar stories are told in the Brahmanda Purana and also in the famous epic, the Mahabharata. She also appears elsewhere in tantrik texts, including as Mahishamardini (killer of the demon Mahisha) in the Kulachudamani Tantra. The gods lost their empire to two great antigods (asuras), Shumbha and Nishumbha, and prayed to the Goddess for help.
Needless to say, the ever compassionate Devi took on these proud antigods and vanquished them utterly. To this end, she assembled an entire army of Shaktis similar to her and when things became very tough, projected Kalika out of her third eye. She is called Durga because she slayed the son of the arch-demon Durga, son of Ruru.
As the Matrikabheda Tantra points out, the names of the goddess are really adjectives, and she is one, under these different descriptions. For example, the goddess in Chandi takes the forms of Kali, Sarasvati and Vaishnavi, representing the three gunas, to subdue the host of demons.
As Lalita, she subdued the demonic Bhandasura at the request of the gods, who then built the Shri Yantra to celebrate her greatness.
The metaphor is that she is cruel to the demonic; that is to say to the proud ego of man.
The hymn to Durga in the Mahabharata contains the verses (shlokas):
"I salute Thee, leader of Yogis, one with the Brahman,(Arthur Avalon's translation in Hymns to the Goddess.)
Dweller in the Mandara forest.
Virgin, Kali, spouse of Kapala, of tawny hue.
Salutation to Thee, Bhadrakali.
Reverence to Thee, Mahakali,
Chandi, Fearless one. Salutation to Thee,
Saviour imbued with all good fortune."
So, too, in the Karpuradistotra, a famous 22 verse hymn to Dakshina Kalika, we find the commentator describing the animal sacrifice of cats, camels, sheep, buffaloes, goats and men as symbolising six vices.re