There were two main theaters of the war in Europe: Spain itself and West-Central Europe, especially the Low Countries (although there was also important fighting in Italy and Germany). The latter proved the more important, as Eugene and the English commander, John Churchill, 1st Duke of Marlborough distinguished themselves as military commanders. At first, France was successful in the Alsace, and threatened the Austrian capital, but the two generals managed to link up in Bavaria and won the Battle of Blenheim. France's trans-Rhine ambitions were crushed, and the French were forced into a defensive posture. Bavaria was knocked out of the war, and Portugal and Savoy changed sides.
In Spain, Valencia and Catalonia switched side in favour of the Austrian pretender, Charles. A British fleet, sent to support Catalans, captured Gibraltar, a possession they held throughout the Siege of Gibraltar and hold to this day.
Marlborough and Eugene split forces again, with the former going to the Netherlands, and the latter to Italy. Over the next two years, each drove the French back from those territories, with 1706 seeing both Marlborough's notable victory over the French army of Marshal Villeroi at the Battle of Ramillies, which resulted in the French loss of the Spanish Netherlands, and Eugene's victory at Turin.
In 1707, April 25, Battle of Almansa (Valencian country) Austriacist army was defeated by the Bourbon army. Then the war in Spain settled into indecisive skirmishing from which it would not emerge.
The French fought back, and managed to stall Eugene's invasion into the south of the country, and Marlborough got caught up in an endless succession of fortresses in and around Flanders. In 1708, Eugene and Marlborough once again managed to link up in Flanders, and defeated the French under the Duke of Vend?me at the Battle of Oudenarde. An attempt to march on Paris in 1709 resulted in the Battle of Malplaquet, which was won by the two generals but at such a cost to their forces that this final invasion had to be called off.
Britain began to get cold feet, too, as an over-decisive victory for Austria would be almost as bad for their interests as one for the French and Spanish. Marlborough fell out of grace with the English (or rather, now, British) crown and with the new Tory government and was recalled and replaced by the Duke of Ormonde, who refused to commit his troops to battle. Peace negotiations with France led to the Treaty of Utrecht in 1713, in which England, Holland, and France ceased fighting with one another, and Great Britain left the Catalans alone to fight for themselves.
In 1714, September 11, Barcelona surrendered to the Borbonic army after a long siege. The Franco-Austrian hostilities lumbered on until September 1714, before the signing of the Treaty of Baden.