I assume that you are asking about the crisis that is commonly called the “Cuban Missile Crisis.”
The Cuban Missile Crisis had its origins in the decision by Nikita Khrushchev to put medium-range nuclear missiles in Cuba. Cuba had recently become communist and so its new government was willing to allow the Soviets to do this. The Soviets wanted to do this since they had no missiles at that point that could hit the mainland US from Soviet-controlled territories. Meanwhile, the US had better missiles and had sites in Europe from which they could be launched. The missiles were brought to Cuba beginning in September of 1962.
On October 14, 1962, a US spy plane flight over Cuba revealed clear evidence of the missiles. President Kennedy was informed of this on October 16. On October 22, Kennedy announced that the US would blockade Cuba to prevent any more missiles from getting to Cuba. It would do this until the missiles already there were removed. On October 24, the Soviet ships that were on their way to Cuba reversed course, not testing the blockade. This was critical because it prevented an armed confrontation between ships that could have escalated into war. On October 26, the Soviets publically say that they will remove the missiles from Cuba. Privately, the US has agreed not to invade Cuba and to remove its missiles from Turkey. The missiles left Cuba on November 5 and the blockade ended on November 20.