Vashishtha and Vishvamitra both were two of the Saptarishi known to mankind today. They were extremely powerful and had immense yogic and Vedic knowledge and powers. Vashistha is a descendant of the Ikshvaku dynasty. Lord Rama also belonged to the same dynasty. Sage Vashishtha is the author and creator of Mandala 7 of Rigveda. He is known to be the family priest of the Raghukul or Raghu Dynasty. He has also been a teacher and guide to Lord Rama and Lakshmana. Vishvamitra vs Vashishtha rivalry is a very popular one in Hindu Mythology.
Vishvamitra was the son of Gaadhi, grandson of the great king Kusha. He was a great warrior and belonged to the Chandravanshi or Somvanshi dynasty. He was the king of Kanyakubja which in modern-day is known as Kannauj, situated in Uttar Pradesh, India. He later grew to unbelievable spiritual heights through various penances and meditations. Vishvamitra had taught weaponry and Vedas to Lord Rama and his brothers. He wanted them to fight the demons who were troubling sages in the forest. Dasharatha was sceptical of sending his sons for this task but later decided to permit them. This same training was later used by Lord Rama to fight against Ravana.
The Vishvamitra vs Vashishtha clashes were infamous then and continue to be now. When two strong personalities exist together, there are bound to be fights and attempts to showcase their superiority. Vishvamitra had a tendency to keep clashing with Vashishtha to prove his power and supremacy over him. Their fights had become so often and sometimes so dangerous that Lord Brahma had to intervene sometimes. Out of the many incidents, two are very well known through various writings.
Vishvamitra cursed King Harishchandra to turn into a crane after facing multiple indirect insults from the king and his subjects. When Vashishtha came to know about this, he turned himself into a crane too in attempts of accompanying the king. Vashistha once destroyed the entire army of Vishvamitra with his spiritual and divine powers. Vishvamitra was furious and wanted to seek revenge on Vashistha. He prayed hard and did a very stringent Tapasya (penance) to impress Lord Shiva and seek his blessings.
Lord Shiva finally came to him and blessed him with the knowledge of celestial weapons. He was very proud of his achievement and filled with happiness to finally be able to take the sweet revenge he waited on. He proceeded towards Vashistha’s hermitage and killed thousands of his sons, leaving the place in complete chaos. Vashistha used his Brahmadanda to contain all the power from Vishvamitra and nullify it. He then attempted to attack Vishvamitra. This could have led to mass destruction. The gods interfered at the right time and stopped this from happening. Vishvamitra was once again left humiliated in this situation and sage Vashishtha became busy restoring his destroyed hermitage.
An older fight between Vashistha and King Kaushika (Vishvamitra) shows how the king took the path of penance and came to be known as a Maharishi and Brahmarishi. This Vishvamitra vs Vashishtha incident started when king Kaushika laid his eyes on the divine cow called Surabhi, owned by sage Vashishtha. Vashishtha however did not want to give up Surabhi also known commonly as Kamadhenu. Kamadhenu was created from the ocean churning incident. King Kaushika attacked the sage in attempts to secure the cow and for disrespecting him. With the help of his divine power, Vashistha destroyed the entire army and defeated Vishvamitra. Vamadeva rescued Vishvamitra and upon being asked by Vishvamitra guided him to the way of becoming like sage Vashishtha. This is how King Kaushika started his journey towards becoming Vishvamitra.