The Spanish-American War concluded with the United States winning the war very easily. At the conclusion of the war, many of Spain's remaining overseas possessions were taken from Spain and either given their independence or put into the possession of other countries.
The United States took a few of Spain's possessions for itself. For example, it took Puerto Rico, the Philippines, and the island of Guam in the Northern Mariana Islands (in the western Pacific). Cuba, which was one of the major reasons for the war, was given at least nominal independence.
With its military decisively defeated and its territories taken away, Spain came out very badly at the conclusion of this war.