Devi form in Puran : Hindu  mythology includes several reasons of Durga’s origin. She is known to arise from Visnu as the power that makes him sleep or as his power. In the Visnu-purana Visnu has marked Devi to
help delude a demon king who is threast to the infant Krisna. In the Devi-mahatmya she comes to
the help Lord god Brahma and ultimately of Visnu himself when Brahma request her to leave Visnu so that Visnu will awaken and fight the demons Madhu and Kaitabha. The Skanda-purana relates that a demon named Durga threatened the world. Siva requested Parvati to slay the demon.
Parvati then assumed the form of a warrior goddess and defeated the demon, who took the form of a buffalo.
Thereafter, Parvati was known by the name Durga. A similar account of her origin occurs in myths
relating her defeat of the demons Sumbha and Nisumbha. Durga emerges from Parvati in these accounts
when Parvati sheds her outer sheath, which takes on an identity of its own as a warrior goddess.

Reference : David Kinsley (Hindu Goddess)