Foreign policy for the United States started during the Revolution. In the late 1800's, the time period you are talking about, it was weak because we were trying to rebuild a nation. We still annexed territory from Mexico and Russia, so we can build more and create more space for the now free black to travel West. Remember, "cowboys" were in fact a majority black and Mexican.
Secondly, the Spanish-American War was where we really took charge of out foreign policy. Teddy Roosevelt said "Speak softly and carry a big stick". He want to police the world. During this time, it was believed the the Spanish sunk a US Naval vessel off the coast of Cuba (later, this was found to be completely false). What the American people wanted was justice. So, President Teddy R. and his rough riders led the charge against the Spanish in Cuba. After wards, Teddy spoke those famous words and gave in to the pleas of the Philippines. The filipino people did not want to be ruled by the Spanish anymore. So we were able to get Spain out of there and claim the Philippines, not as a territory, but as a republic almost. It is like Guam and Puerto Rico are to us today. We set up democratic system in place and took complete advantage of their supplies and local resources.
Lastly, you have the League of Nations, predecessor to the United Nations, Woodrow Wilson, after WWI, created this to prevent future conflicts like WWI from happening again. He took all the democrats over to Europe to create this and the Republicans were not happy about, not only being left out, but also they thought it ws a horrible idea because they believed the America should stay isolated and not have a hand in the worlds affairs.