The Spanish-American War was fought over the course of four months in 1898. The war was fought in the Caribbean and the Pacific, and resulted in a victory for the United States. The US gained several colonies from Spain including Cuba, the Philippines, Guam and Puerto Rico. The latter two are still part of the United States.
The late 1800's were a high point for yellow journalism, where media magnates like Joseph Pulitzer and William Randolph Hearst would compete over readership by exaggerating, sensationalizing and sometimes even fabricating news stories. In the spring of 1898, the USS Maine exploded because of what most modern historians agree was a boiler failure. The ship sank and hundreds of men died. Because it was stationed in Havana, the sensational media was quick to put the blame on Cuban or Spanish conspirators.
While the government of the United States was uneasy about the option of war, newspapers had convinced the public that revenge was the only option. Several weeks after the Maine explosion, America declared war against Spain. Action in Cuba was sporadic, since Spain did not have a very substantial military presence there, and it was difficult to transport large amounts of men across the Atlantic . The United States, although it was geographically closer to Cuba, did not have a very large or effective military at that time either. Back home in the US, however, stories of combat were exaggerated and fictionalized. In a famous (though probably fictitious) quote, Hearst reportedly told a journalist, "You furnish the pictures and I'll furnish the war," after he was told there was little to report in Cuba. Future president Theodore Roosevelt saw some combat in Cuba as part of a cavalry gruop known as the "Rough Riders".
In the Philippines, though both Spanish and American presence was limited, Spain maintained naval resources in order to protect its trade with nearby China. The Battle of Manila Bay saw combat between American and Spanish battleships. The heavily mined Manila Bay proved treacherous for the Americans, but they pushed on and did not sustain major damage. They met the Spanish forces in combat and quickly decimated them without taking a single fatality. Manila was secured shortly thereafter.
News of success heightened nationalism and patriotic sentiment in the United States, while Spain was undergoing domestic instability and economic turmoil. Unable to adequately respond to US attacks, Spain sued for peace and gave up most of its diminished colonial empire. America's newly gained influence in the Pacific, Caribbean and Latin America is now seen as a point when United States influence came to dominate the Americas. Ideas of American exceptionalism, the American Empire and Manifest Destiny were revitalized and the US began seeing itself as the "world's policeman", defending freedom and democracy.