The Cubans revolted against Spain, but Spain didn't like this. So they sent their best General to Cuba, Valeriano Weyler, to keep Cuba safe. Yellow journalism is when people take a true story and exaggerate what was going on in Cuba to get the US's attention.
The USS Maine was an American war ship that was sent to the harbor to protect Americans and the property. It was later blown up losing 250 american sailors. The explosion was blamed on Spain.
Treaty of Paris
President McKinley's role in peace was that he wanted to keep the US and Spain good friends. He didn't want to go into war. If he did then the two countries would be enemies.
President McKinley sent Spain a list of demands of what they wanted in order to avoid the war. Spain accepted all but one of them and that was letting Cuba be independent,
This was a signing that the Cubans had independence from Spain. The Amercians wanted to get some territory. So they did.
Americans spent 20 million dollars on 3 territories. The three were Guam, Puerto Rico, and the Philippines. All three of these were previously owned by Spain.