How is the Philippines involved in the Spanish American War

3 answers

https://www.nps.gov/goga/learn/historyculture/spanish-american-war.htm
I found that earlier but I couldn't understand how the Philippines became involved. It talked about how Cuba did but I am still confused as to why the Philippines became a part of it.
That fact isn't clear in that article.

Spain had ruled the Philippines since the 16th century. When the Americans defeated Spain in the Spanish-American War, they took over the Philippines.