On February the 15th, in 1898, The battleship Maine was sunk by the Spanish crown, in Havana Harbor. This was the reason why the United States declared war on Spain in May of the same year.
When the war ended, in December of 1898, Spain had lost all its control over the territories of Puerto Rico, Cuba, The Philippines Islands, and Guam, with some smaller islands as well.
The War ended with the ratification of the Treaty of Paris, that was signed on December 10th, 1898.
Answer:
The main advantages of the USA were:
A larger population, the USA had the majority of large cities of North America at the time, and a lot of immigrants, while the Confederacy was mainly rural, and not as populated. This larger population meant a more numerous army.
And a more powerful economy with some industry, which facilitated the production of arms and supplies for the military.
The disadvantage was that USA was the aggressor, and had to take up territory, while the confederacy only had to defend itself.
The confederacy main advantage was that as defenders, they knew most of the territory better, and had overall a more advantageous geographical position, at least at the start of the war. The main disadvantage for the Confederacy was precisely the smaller population -which means a smaller army- and the less developed economy, which was mainly agrarian, lacking almost any form of industry.