"Three billion human lives ended on August 29th, 1997. The survivors of the nuclear fire called the war 'Judgment Day'. They lived only to face a new nightmare: the war against the machines." - Sarah Connor, Terminator 2: Judgment Day
The War Against The Machines is the main focus behind all the stories of the Terminator universe. It is a globe-spanning conflict between human Resistance forces and the machine armies of the renegade military AI known as Skynet. Skynet recognizes humanity as a threat to its own existence and declared a campaign of genocide against mankind by launching a worldwide nuclear attack that wiped out over half the planet's population.
Since the initial J-Day bombardment, Skynet has built numerous war machines such as the Hunter-Killers and the Terminators to hunt down and exterminate the surviving remnants of the human race. The remaining human militaries have banded together as best they can to form an organized Resistance against SkyNet, recruiting anyone willing and able to fight to help bring down the supercomputer network. The leader of the Resistance is John Connor, who had been trained by his mother Sarah how to fight and was raised to think and act like a military strategist. Despite being a civilian before J-Day, the training he received from his mother, his experiences with reprogrammed Terminators sent back through time and his military training in the early days of the war, have all helped John to become a respected commander, and even to be seen by some as a messiah who will release the world from darkness. Such prophecies have proven true as John inevitably leads the Resistance to victory and destroys Skynet, but not before the rogue AI sends several of its cyborg assassins back in time to alter its fate.
Thus, the war against the machines is fought on different fronts across time, with SkyNet sending Terminators into the past to kill John Connor before he comes to lead the Resistance, and with the Resistance sending their own soldiers through time to prevent the young John's assassination and/or to stop Skynet's creation. This has resulted in the timeline being fractured, with Judgment Day's occurrence and Skynet's level of influence and power being constantly altered. The span of the war is unknown and probably depends on whether or not Skynet is able to continue devising contingency plans to prevent its destruction.