The short answer to this question is that many Americans held Spain responsible when the USS Maine exploded.
The USS Maine was a US Navy battleship (sometimes listed as an armored cruiser). She was sent to Havana in 1898 to protect Americans at a time when there was an uprising in Cuba against Spain. (Cuba was Spanish territory at that time.) While in the harbor in Havana, the Maine exploded with heavy loss of life.
At this time in the United States, “yellow journalism” was a major factor in driving public opinion. This type of journalism was very sensationalistic and yellow journalists were not above reporting things that were not true if they felt that doing so would help to sell newspapers. After the Maine exploded, newspapers reported as fact that she had been blown up by the Spanish. This was one of the most important factors in pushing the US to declare war against Spain, starting what we now call the Spanish-American War.