The jedi Civil war was a intergalactic that occured 3000 years before the original trilogy. In the Star Wars timeline this took place from 3958 BBY (Before the Battle of Yavin) to 3956 BBY. It tore the jedi apart from it's core, and it's aftermath left the jedi order in a state of dissarray and prone to defeat from any more sith attacks.
The jedi civil war was the direct result of another war in the Star Wars Universe. The Mandalorian War, a conflict caused by the mandalorians, who felt the need to colonise the galaxy. The jedi resistense was led by the jedi knight known only as the revanchist. With his expert tactics and combat skills, he led many defensive and offensive attacks on the invading mandalorians. The war ended when the revanchist killed the mandalorian leader, Mandalore the Ultimate, and the mandalorians were disbanded. Before his death though, Madalore told the Revanchist that the mandalorians had been tricked by a sith lord in the unkown reigons. Revanchist and his friend Malak then set into the unkown reigons to find this supposed Sith Lord. However, unkown to the Jedi Order, Revanchist and malak had fallen under the control of this sith lord and become sith lords, under the names of Darth Revan and Darth Malak, as a Sith lord and Sith apprentise respectivly. Despite breaking free of this control, Revan felt he had to amass an army stronger than the republic to withstand the old sith empire, which would soon attempt to invade the republic.
In 3958, Revan, and Malak attacked the unexpecting Republic, with an army built from veterans of the Mandalorian War and Dark Jedi, and Revans masterful tactics, the republic stood no chance. As if this was not bad enough, Jedi who had admired Revan during the Madalorian War also joined his forces. This caused a split within the Jedi Order, thus the name, 'The Jedi Civil War'. As well as having a large army, Revan was equipped with an artifact from the time of the Je'daii order, some 30,000 years prior. named the Star Forge, it could create ships in an instant using the power of a star. This allowed Revan to create a fleet bigger than the republic could ever imagine.
With an Unstoppable fleet and army, the republic was brought to it's knee's. They were about to be completely destroyed. They had one option left if they were to win. The republic set a trap for revan and his forces at a planet, so when the republic ambushed them, Malak saw this as a chance to get rid of his master and become the supreme leader of the sith, without any intention to save the galawxy from the Old Sith Empire. Malak ordered his ship to fire upon revans, making it look like the republic did this. While Revan survived, his mind had become broken and he was not the man he used to be. The Republic recovered his body, and brainwashed him into thinking he was a republic loyalist. The Republic also used this as a way to find out about the Star Forge. There, the republic launched an attack on the Star Forge, and Revan confronted Malak on the bridge. Revan was victorious in killing Malak and the Star Forge was destroyed. With the New Sith Army Disbanded, Revan once again disappeared in the Unknown Reigons, this time for good.