The Peloponnesian war started in 431 BC and ended in 404 BC.
At the beginning of the war, Athens and Sparta were the heads of their alliances, which were called leagues. Athens was the head of the Delian League, and Sparta was the head of the Peloponnesian League. The Peloponnesian League was named that way because Sparta was in a part of Greece called the Peloponnes.
The war was split into three phases. In the first phase, Athens attacked Sparta with their warships and decimated the smaller and less trained Peloponnesian fleet. This phase ended with the Treaty of Nicias in 412 BC.
The second phase began with more fighting in the Peloponnes. Athens attacked Sparta with most of its army and lost a humiliating defeat, where its entire force got obliterated on the way and when they got there.
The war was ended in 404 BC when the Spartans allied with Persia and defeated Athens. The Thebans wanted Athens destroyed and all the people in it to become slaves, but Sparta did not agree.
This war was important because it weakened Greece and made it easy to conquer by the Macedonians.