The War of the Pacific happened a long time ago, in the late 1800s, when three countries named Chile, Bolivia, and Peru got into a big fight over some land near the coast of South America.
Imagine you and your friends fighting over who gets to play with a toy or who sits on a certain chair - it was kind of like that but on a much bigger scale.
Chile wanted that land near the coast because it was rich in natural resources like minerals and lots of fish. Bolivia also claimed that land as their own but they didn't really have access to the ocean from their own country. Peru was friends with Bolivia and they decided to help them out by joining forces against Chile.
But Chile was a pretty strong country and had a powerful navy, which meant they could easily block any seaports that Bolivia and Peru wanted to use to get supplies. Chile also had a strong army, which they used to attack and defeat the armies of Bolivia and Peru in a bunch of big battles.
In the end, Chile ended up winning the war and gained control of the land they wanted. Bolivia lost its access to the ocean, which was a big blow for them, and Peru lost a lot of its territory.
Overall, the War of the Pacific was a sad and violent time in South American history, but it also helped shape the borders and relationships between these countries for years to come.