The inter-machine conflict began when the power plants are no longer generating enough energy to power the machines and the machine cities, although the origins of the conflict might have began as early as during the beginning of the truce between the humans of Zion and the Sentinels, where a group of Sentinels disagreed with the decision to not attack the human settlement and retreat thereafter.
The Machine War ended with a peace agreement between humans of Zion and the Sentinels of the Machine world. When Neo sacrificed himself for peace, this fundamentally changed the relationship between humans and machines. Machines were no longer of a singular mind in their hatred for humans. Aside for an unwarranted assault by a faction of Sentinels disgruntled over the truce that resulted in the destruction of Zion a few years after the truce due to building a new city in secret, in general the peace actually held for many years, a coexistence between the two kinds for the first time since before the events of the Second Renaissance several hundred years ago.
Eventually, so many redpill humans were allowed to leave the power plants under the Truce that the Machines started to face a serious energy shortage. Factions began to form among the Machines competing over limited energy resources, and some even arguing that they should break the Truce. The situation became desperate enough that it turned into open warfare, and for the first time Machines fought other Machines.
The conflict was further exacerbated when the Analyst usurped control of the Matrix from the Architect, thereby ruining whatever plans the previous machine controllers had in it. The Analyst's takeover also further divided the Machines into more competing factions, many of which desperately trying to take back the Matrix from his control. As the Machines splintered into different factions, many of them in the real world even allied with the free humans.
The Analyst's coup extended into the Matrix itself, where he instituted a purge of any Programs that were not loyal to him. The Oracle was purged in the first days of the conflict, soon after she sent a warning to the humans that a "new power" was rising in the Machine civilization. Sati's parents Rama Kandra and Kamala attempted to turn on the Analyst, but when he discovered their treachery he deleted them both. Sati fled into hiding but continued to aid the free humans when she could.
Effects on free humans
The Analyst then led his forces to attack Zion, destroying the city - though he failed to completely eliminate the human forces, many of whom successfully evacuated. This was apparently due to a combination of his faction having fewer forces at its command (compared to the earlier Battle of Zion), Zion being stronger after years of peace, and other independent Machines siding with the humans.
The humans regrouped and with their new Machine allies rebuilt a new underground city, IO, led by General Niobe, kept hidden by hologram projectors. As the years passed, the Analyst and the other Machine factions in the real world were more concerned with fighting each other than the surviving Zion forces, so the remaining Zionites were largely ignored and could focus on rebuilding. As decades passed, IO actually managed to flourish to a greater extent than the original Zion ever did, which was only possible due to its human and Machine inhabitants working together. However, this also made Niobe adopt a more cautious mentality, focusing on expanding IO instead of provoking the hostile Machine factions by trying to free many more humans from the Matrix.
It isn't stated exactly how long after the Battle of Zion the Machine civil war broke out. An elderly, 90 year old Niobe recounts to Neo what happened when he is freed from the Matrix for a second time, about 60 years after the Battle of Zion. Bugs says that the Oracle was purged before she herself was freed from the Matrix, which based on Bugs' age implied it happened at least over a decade prior.
In the flashbacks to the civil war Niobe still doesn't look middle-aged, just played by actress Jada Pinkett Smith without old-age makeup, returning to her role almost twenty years after the third film. Thus it's loosely implied that she aged in real time with the story, and the Machine civil war happened roughly twenty years or so after the Battle of Zion, but still three or four decades before The Matrix Resurrections - enough time for Zion's remnants to build an entirely new city, IO, that actually surpassed the original Zion. Both Niobe and Bugs insist that the Neo's Truce actually did hold for many years before the new power rose in the Machine civilization, i.e. around twenty years.