The US decided to intervene in the conflict between Cuba and Spain in 1898, after the explosion of its cruise called USS Maine, for which the Spanish were blamed. Cuba was fighting against Spain for its independence and, since the US entered in the conflict, it is known as the Spanish American War.
After the explosion of the Maine, the yellow press portrayed the Spanish people as cruel murderers, and this turned the US public opinion to be in favour of intervening in the war in Cuba's side against the Spanish.