The purpose of the Truman doctrine was to establish that the United States would support a democratic nation under threat from an internal or external authoritarian force. This support could include economic, political or military assistance.
While the Soviet Union wasn't mentioned specifically in the speech establishing the Truman Doctrine, the doctrine was meant to serve as a warning to the USSR. After World War II, Stalin told Roosevelt and Churchill that free elections would take place in eastern European countries liberated from the Nazis by the Soviets during the war.
Western leaders believed this meant elections exactly like those in the West. Stalin, however, wanted communist, Soviet-friendly governments in nearby countries. He never intended to have fair elections, and many countries were taken over by leaders loyal to Moscow.
The Truman Doctrine set the tone for U.S. foreign policy in the years after the war. Truman believed that the United States could no longer allow Soviet-friendly governments to replace governments friendly to the United States. This was because the security of the United States now depended on more than physically securing American territory. Because of this, the doctrine was used to provide support for Greece and Turkey to help defeat communists from taking over their governments.