Rambha, the king of asuras, took a liking to a lady buffalo and decided to marry her. After sometime, a son was born to them. Mahishasura, as an asura or demon, was born with superhuman powers. He had the ability to change between human and buffalo form at will. He was a deceitful demon who persued his evil ways by shape lifting. At that time the devas or gods and the asuras were bitter enemies. They were always fighting with each other and it was the gods who usually won. When he grew older, he thought to become the most powerful being in all creation. For this, Mahishasur began a long penance to pray Lord Brahma, the creator, for an immorality boon . His austerity finally appeased Brahma and he granted him a boon (vardaan) that he couldn't be destroyed by man, god, demon or beast - it said nothing about whether or not a woman could kill Mahishasura.

After suppressing all the mortals, he challenged all gods. All divine weapons of the gods proved useless. As Bhrama, Vishnu and Mahesh (Hindu Gods) joined forces, a powerful entity began to shape. And that powerful entity was the Goddess Durga. Then, a pitched battle ensued between Mahishasura himself, and the goddess. Despite all his wiles (changing his shapes to lion, snake, and finally to buffalo), the godesses struck a death blow to the demon. And from that moment on, the Goddess Durga was also known as Mahishasura Mardini - the destroyer of Mahishasura and Mahishasura is traditionally depicted as Half-man, Half- Buffalo.

More Info: en.m.wikipedia.org