Mahishasura is the buffalo-demon who is responsible for the Goddess's birth in the Devimahatmya, the oldest and most essential source for the Goddess's mythology.
Mahishasura is granted the ability to vanquish the gods and
cannot be slain by any man.
They are expelled from their divine home and seek refuge in
the mountains.
While they are there, the gods release their accumulated
brilliance (tejas), condensing into the form of the Goddess, who embodies all
of their collective might.
To face Mahishasura, the Goddess mounts a lion.
He has feelings for her, but when he offers marriage, she
says that she would only marry a guy who can beat her in war.
Mahishasura is beaten after a hard struggle.
He attempts to avoid the Goddess by changing his shape
multiple times, but she strikes him with her sword each time, eventually killing
him by chopping off his head.
You may also want to read more about Hinduism here.
Be sure to check out my writings on religion here.