During the time that the United States was pursuing this policy, it did a whole bunch different kinds of things to try to contain communism and prevent it from spreading farther than it already had.
It gave economic aid to countries to prevent them from wanting to become communist. The biggest example of this is the Marshall Plan.
It engaged in covert action to try to overthrow government it thought were communist. Examples of this are when we helped overthrow the governments of Iran and Guatemala in 1953.
It engaged in actual wars like those in Vietnam and Korea.