Maharshi Vishwamitra was Kshatriya originally and his name was Vishwarath, After his father made him the king, Instead of thinking about People's good future. He insisted on increasing border of his kingdom. So He went out for attacking and acquiring other states. After all this attacks and winning while returning back to his land, he and his soldiers got tired. and they thought of taking rest. The place they stopped near to, was Maharshi Vashishtha aashrama. Vishwarath and his soldiers were invited by Maharshi Vashishtha for food, But Vishwarath asked 'em whether they'll be able to feed these many people.
But Maharshi Vashishitha said, they'll be able to feed these many people. Because in Maharshi Vashishtha ashram, he had divine Nandini cow who was fulfilling everything one desired.
When Vishwarath came to know about it, he was quite surprised. Anyway he went back to his land. When he came to his land, The Mantri told that we don't have any food now to eat, because nobody was there to do agriculture, everyone went with him for the war. Now everyone in his kingdom is suffering from hungriness.
Then Vishwarath remembered about the cow Maharshi Vashishtha had, he immediately sent his soldiers and ordered 'em to bring Nandini. Soldiers couldn't bring Nandini forcefully; then Vishwamitra went himself and asked Vashishtha to give Kamdhenu to him, but Vashishtha declined and said it's not his kingdom but mine, if you want to take Nandini with you, try it.
Then Vishwarath tried to take Nandini, but he couldn't even touch her because of her divine power. Then Vashishtha said, Ahamkara is not good, become like a Rishi.
But Vishwarath was Khathriya and was like a insisting kid, He challenged Vashishtha that he'll gain same Rishi (i.e. Sage ) power like him, and then he left his all kingdom and went to the Jungle, there he did Tapasya.
During Tapasya he invented "Ohm Bhurbhuva Swah" Mantra. It is said with his Tapasya he invented Mother Gayatri. Since this mantra was very useful for every mankind, that is why Mother Gayatri gave him a name VishwaMitra (i.e. one who is friend of this worldly people).
This is where The conflict between the two started and was never ending.
Reference: Mahabharata; Maha:1.175-183