Before the war
At one point, years before the event of GTA San Andreas, the two hispanic gangs possibly had a misunderstanding, sparking their bloody rivalry.
Beginning of the war and decline
At the beginning of the game, the Vagos were much stronger than the Aztecas, having control of northern and eastern parts of the South Central of Los Santos meanwhile the Aztecas occupied the southwestern of South Central. Later on the game, the gang leader Cesar Vialpando left the city of Los Santos with Carl Johnson, the Ballas and their allies the Los Santos Vagos had taken over all the gang territory in Los Santos. When the two returned the Vagos had taken over all of the Varrios Los Aztecas territory.
The end of the war
Then in the mission Los Desperados, Cesar, Carl, and the three high-ranking members of the Varrios Los Aztecas (Sunny, Gal and Hazer) fought against the Vagos throughout the El Corona Village, starting from the train station and ending at Cesar's house. A big shootout between the two gangs ensued, leaving many of Vagos' members dead and the Varrios retaking control of El Corona.
Here's a video of the only point of the war to be shown in the game, as depicted in the mission Los Desperados.