Related question: Did the war attract enough attention to have the larger European powers send military observers? If so, what lessons did they learn?
Related: the War of the Triple Alliance was around the time of the American Civil war. Were both wars similar in how they were prosecuted and technology/strategies used??
There are lots of different theories on why the war was fought in the first place. I'll try to answer according to one theory.
First, South America at that time (19th century, a few decades after independence) was still in a state of flux regarding national borders. Lots of them weren't settled, there were lots of conflicting claims. This led to lots and lots of conflicts throughout the century, and the beginning of the 20th century. Some of these conflicts led to new countries being formed (like Panama), some disappearing (like what we now call Great Colombia, or Peru-Bolivia) and to redrawing of borders (like Bolivia losing its access to the Pacific Ocean to Chile). So some people in Paraguay, most specifically the elite and Solano Lopez, the dictator, thought their border could be redrawn. Mostly, if Paraguay could win the war and get territories to stop being a land-locked country, which was hindering its development.
Second, Paraguay had a standing army that was bigger than its neighbors. For several reasons, Paraguay had armed itself a lot while its neighbors didn't. So Paraguay, who had the population of 450,000 could summon up to 60,000 to 80,000 conscript soldiers very quickly, while neighboring Brazil, who had a population of almost 10 million, had a standing army of 8,500. This would be an advantage for Paraguay early in the war but as Brazil and Argentina mobilized for war would be Paraguay's doom. It's possible that Solano Lopez thought the war could be over soon, but this is just speculation.
Third, Solano Lopez thought initially that Paraguay wouldn't be alone in the war. Argentine sources claim that Solano Lopez thought that he could get Argentinean caudillos on his side, more especifically Justo Jose de Urquiza, governor of Entre-Rios, who was an oponent of the Buenos Aires government and, specially, of Mitre, president of Argentina at the time. Argentina had been plagued with civil wars between federalistas (more autonomy for the provinces) and centralistas (more power to Buenos Aires, the capital) throughout the 19th century and Lopez thought he could get one side to fight the other. But Urquiza sided with Mitre, remaining a loyal Argentinean, foiling Solano Lopez's plans.
Also, the official reason the war started was Paraguay giving an ultimatum to Brazil to stop meddling in Uruguay's internal politics, and warning that if the Brazilian army entered Uruguay, as it had on the past to interfere in Uruguayan politics, the Paraguayans would be forced to do something. Brazil had been meddling in Uruguay's politics for a time, and at that time was demanding compensation for damage the supporters of the Blanco Party (pro-Paraguay) had done to properties in the neighboring Brazilian state of Rio Grande do Sul (sidenote here: there's no natural boundary between Uruguay and this state, like a river or a mountain range, it's just a big plain that's arbitrarily divided in two so it's difficult to notice when you left one country for the other, especially at the 19th century, so soldiers in a civil war could indeed accidentally damage a farm that's actually in a neighbouring country). Brazil didn't think Paraguay was going to actually do something besides protest diplomatically, and Brazilians were very surprised when Paraguay actually invaded Brazil due to these actions in Uruguay. Anyway, Solano Lopez thought part of Uruguay would fight with him, but these guys were already under siege as the Paraguayan war started and would lose very early.