The Great Titan War was a period of civil war within the Eldian Empire. The 145th king, Karl Fritz, abandoned Eldia's conflicts, which led to fighting between the other eight houses with the power of the Titans. This allowed the oppressed Marleyan people to rise up, and, with support of the Tybur family, they overthrew the weakened Eldia. The war resulted in the fall of the Eldian Empire, the retreat of the Eldians to Paradis Island, the creation of the Walls, and the restoration of Marley.
Prelude: For many hundreds of years, the various familial houses subservient to the Fritz family were in constant conflict between each other for control over the eight Titans, though the power of the Founding Titan maintained order in the Eldian Empire throughout the centuries. However, when the Founding Titan was inherited by Karl Fritz, the 145th King of the Fritz monarchy, he chose instead to abandon the conflict of Eldia and relocate the capital to Paradis Island to the east of the mainland. Believing that Eldia deserved retribution for their crimes against the world throughout the centuries, Karl Fritz conspired with the Tybur family, the holders of the War Hammer Titan, to bring about the downfall of Eldia.
The war: After the Eldian Empire began to run out of enemies, the people of Marley were able to instigate a civil war, the Great Titan War, in Eldia. The eight families who held the Titans turned on each other in an endless cycle of conspiracy and betrayal. Amidst the conflict, the nation of Marley succeeded in gaining the powers of seven out of the Nine Titans which held dominance in Eldia, dramatically turning the tide of the war in their favor.
Aftermath: After the closing of the gates in the Walls, Karl Fritz used the power of the Founding Titan to erase the memories of the world before the raising of the Walls from the minds of the Subjects of Ymir. For the next century, the Subjects of Ymir would live on believing themselves to be the last remnants of humanity on earth, with the world beyond the Walls overrun by the Titans that had appeared without warning in the year the Walls were raised. Across the sea on the mainland of the newly reformed nation of Marley, the people of Eldia who were left behind on the continent became low-class citizens under the authority of their new rulers.
Source: Great Titan War (Anime), available under CC BY-SA 3.0.