Cuba was one of the Latin American nations which choose to openly ally with the Soviet Union. To the United States, this was unacceptable, as Cuba is geographically strategic and close to the United States. The United States of America feared the adoption and spread of Communism, and thus is wary of actions in Cuba.
As a safety precaution, the USSR agreed to supply missles to Cuba for air and land defence. Khrushchev followed his decision in May 1962, and proceeded to install the missles. However, this secret plan was discovered by the United States due to information from French intelligence, and subsequently, from a American U-2 spy plane.
Kennedy saw the photographs of the missle construction sites on 16th October, however, the US had no plans on how to deal with the missles. The Executive Committee of the National Security Council quickly discussed three courses of military action:
The Security Council proceeeded with the naval blockade, as the first two choices would lead to more casualties, and this went into effect on October 24. This also included the economic embargo with Cuba.
However, despite the Soviet ships not attempting to bypass the blockade, work on the missle sites progresses rapidly. On 27th October 1962, Khrushchev proposes that USA removes its missles in Turkey in exchange for the removal of missles from Cuba. Both parties agreed, and the missles were removed, however, leaving Turkey displeased.
Both sides claimed victory after the crisis. The Soviet Union had forced the United States into recognizing Cuba as a Communist state. The USSR even managed to get USA to remove an inherent threat just next to its borders. The USA on the other hand had been seen as a responsible peacemaker as they showed how they were willing to tolerate a Communist State's existence and to betray principles of Containment in order to prevent a nuclear war. The entire ordeal had also thawed Cold War relations for the leaders of both superpowers as both saw how their game had nearly ended in brinkmanship.
America wanted to eliminate the spread of Communism and its associated ideologies. This is related to the industrious attribute of the United States, or in a greater context, the Western Civilization. If an increasing number of countries turn to communism, US trade would be affected, since the Communist states would not trade with the United States. This would greatly impact the economic development of the United States, as well as its supported political ideologies.