The Monroe Doctrine was a policy outlined by President James Monroe in his address to Congress in 1823. This policy maintained that the US would remain neutral in European affairs and would not mess with current European colonies in the Western Hemisphere. However, this doctrine also set that any new attempt to colonize territories in the Western Hemisphere would be seen as a threat by the United States government.
This doctrine was supposed to create two different "spheres of influence." Essentially, the Eastern and Western Hemispheres would be isolated from each other. This doctrine was adopted based on America's involvement in European affairs over the course of the last 50 years. The US was involved in countless European wars/affairs (French and Indian War, XYZ Affair, War of 1812, etc.) and wanted to become isolated from these issues. Along with this, the US wanted the ability to influence Latin American countries in the Western Hemisphere.