Halfway through the movie, Neo returns to the real-world--a new Zion called, Io---where an old Niobe tells him that after the events of Revolutions, there was a period of peace and that many of the machines wound up working with freed humans in Zion, but there were many who still resented them. A civil war breaks out between the Machines as their resources started to dwindle (they do this in one big exposition dump and I didn't catch all of it) because I guess too many humans were leaving the Matrix. Eventually, the Machines wiped out Zion while Niobe led a group of people out who worked with the Machines (who are now cute cuddle-y anthropomorphic things) to build Io and plant strawberries while hiding from the same angry Machines. Again, a lot of this was sped through and I didn't catch all of it but it seemed to be a bigger problem for the machines more than people, but the stakes were still the same: people were free to stay or go.
Neil Patrick Harris plays a second Architect, called "The Analyst" and he built the new iteration of the Matrix and all the iphones and tech junk we have today are ways to keep people numb and afraid to leave the current Matrix. The new power source used to keep the current iteration of the Matrix going was mostly due to Neo pining over Trinity. How and why it still exists at the end of the movie after they unplug themselves is beyond me.