When we speak of the causes of this war, we need to separate the immediate causes from the deeper causes. There were events that led directly to the war, but it is possible to argue that the war was actually caused by conditions and attitudes, not by specific events.
The events that caused the war were connected to a Cuban rebellion against Spain, the colonial power that owned Cuba. Cubans had wanted independence for some time and fighting had flared up in 1895. There was a great deal of sympathy in the United States for the Cuban rebels because of the US’s history as a colony that fought for its independence.
The rebellion in Cuba led to the USS Maine (a warship) being sent to Havana to help protect American interests. The ship was destroyed in an explosion that was blamed on Spain. This was a major cause of the war. So was a letter from the Spanish ambassador to the US in which the ambassador made fun of President McKinley. This was seen as a major affront to the honor of the US. Within two months of these events, war was declared.
But these events are not necessarily the real causes of the war. There were arguably two deeper conditions that caused the war. The first was, as mentioned above, sympathy for groups rebelling against their colonial masters. The second was the fact that the US was becoming more powerful and many Americans were calling for a war to prove the country’s place among the major powers of the world. People like Theodore Roosevelt wanted very much to have a war that would make America into a more aggressive and powerful country. This desire for war had a great deal to do with the coming of the war with Spain.