After the Spanish-American War, in which we inherited the Spanish colonies of Guam, Puerto Rico and the Philippines, we became the dominant empire in those regions of the world in terms of our military and economic control.
Teddy Roosevelt, a veteran of the SA War, established the Roosevelt Corollary declaring the Caribbean essentially an "American lake" and taking a lot more direct interest and involvement in Central and South America. He acquired the Panama Canal Zone and started construction of it as US territory. These are areas and territories we would have to defend over the long term as an Empire.
Lastly, one of the reasons the Japanese attacked us at Perl Harbor and the Philippines was because our empire threatened theirs by our very presence in the region. They simply wanted to remove the threat, especially in the Philippines, which we would not have been in at all if not for imperialism in the 1890s.
The main way that the US pursued imperialism in the 1890s was through war. The US took various Spanish possessions after defeating Spain in the Spanish-American War.
This war affect US foreign policy in the early parts of the 20th century because it made more places matter to the US. Now that the US had holdings in the Caribbean and as far west as the Philippines, it had to care about a lot more things so that it could keep those posessions safe. An example of this is how Theodore Roosevelt got involved in the Russo-Japanese War, partly because the US ownership of the Philippines made Asia matter more to us.