The Galactic Empire was formed by the reorganization of the Galactic Republic in 19 BBY. In 4 ABY, the Empire suffered a large-scale defeat when the Death Star II was destroyed, Galactic Emperor Palpatine was killed, and Darth Vader died. The Empire did not, however, cease to exist at that point.
Over the following decade, the Alliance to Restore the Republic continued to wage military and political battle against the Empire. In 6 ABY, the Alliance was able to seize control of the galactic capital Coruscant, and declared the formation of the New Republic. During this decade, there was also a great deal of infighting amongst Imperials - conflicts commonly referred to as the Imperial Civil War. A series of military and political leaders attempted to take Palpatine's place, including Grand Vizier Sate Prestage, Imperial Intelligence Director Ysanne Isard, Grand Moff Zsinj, Grand Admiral Thrawn, Admiral Natasi Daala. Even Palpatine himself returned to lead the Empire, resurrected by transferring his consciousness into a clone body.
At around 12 ABY, however, having suffered a series of debilitating defeats after numerous positive steps forward, the Empire's hold over the galaxy had essentially collapsed into holding only a handful of star systems. Around this time the Empire came to be commonly referred to outside its borders as the Imperial Remnant. The Remnant made its capital on the planet Bastion, and its significant leader was Grand Admiral Gilad Pellaeon. Pellaeon led the Imperial fleet's retreat following the Battle of Endor; he later served under both Grand Admiral Thrawn and Admiral Daala before rising to the ranks of Admiral and Grand Admiral himself.
In 19 ABY, Pellaeon convinced the Imperial Moff Council to finally sign a peace treaty with the New Republic. A few years later, Pellaeon's Empire allied itself with the New Republic, as well as its successor government, in fighting the extragalactic alien invaders known as the Yuuzhan Vong. The Empire even formally joined the new Galactic Federation of Free Alliances. During the Swarm War (36 ABY) and the early stages of the Second Galactic Civil War (40 ABY), Pellaeon served as Supreme Comander of the GA Defense Forces. Later in the war, he was assassinated by Darth Caedus's apprentice when he refused to support Caedus's coup in the GA and instead backed the GA government-in-exile.
A young man named Jagged Fel - the son of former Imperial Baron Soontir Fel and Syal Antilles, nephew of famed Rebellion pilot Wedge Antilles - became the Empire's new Head of State after Pellaeon's death. Jagged Fel had been raised among Chiss who were loyal to Thrawn and had formed the Empire of the Hand in the Unknown Regions, and had become a trusted friend of the Skywalker-Solo clan. It was Luke Skywalker, in fact, who forced the Moff Council to accept Fel as their new Head of State.
Following turmoil in the Galactic Alliance around 43 ABY due to the policies of GA Chief of State Natasi Daala (particularly in regards to her use of Mandalorian Supercommandos to put down slave revolts on non-Republic worlds and her ardent distrust of the Jedi Order that resulted in the exile of Luke Skywalker and the Order seizing control of the GA government), Fel decided not to have the Empire rejoin the GA.
At some point after 44 ABY, the Remnant was reorganized again with Jagged Fel crowned Emperor. He was the first true Emperor since Palpatine, launched a program to rebuild worlds devastated during the Yuuzhan Vong War known as the "Victory Without War" program, and founded the Imperial Knights organization of Force-users to serve the Empire. By 130 ABY, the Galactic Empire was once again a genuine intergalactic power and was ruled by Emperor Roan Fel. Through the combined influences of ambitious military and political leaders and re-emerged Sith led by Darth Krayt, the Empire went to war against the Galactic Alliance.
The Third Galactic Civil War ended with the Empire reclaiming Coruscant, and Darth Krayt leading a coup d'etat against Emperor Fel. Krayt claimed the Imperial throne for himself. The Second Imperial Civil War then raged for 8 years. By 138 ABY, Krayt's rule over the Empire was ended and Roan Fel was dead. The Galactic Federation Triumvirate was founded, ruled by GA Admiral Gar Stazi, Galactic Empress Marasiah Fel, and Jedi Order Grand Master K'Kruhk.