The Cuba Crisis is probably the event that was closest to start a nuclear war between the USA and the Soviet Union. It all started the 20th of October, when the President announced that the Soviet Union was deploying nuclear missiles in Cuba. This disturbed the terror balance between the Soviet Union and the USA, since the Soviet Union now would be able to attack the USA very quickly. They would only have about fifteen minutes to respond and defend themselves from the attack.
The USA obviously didnt want nuclear missiles in their neighbourhood, and Kennedy announced that they would put a naval blockade on Cuba to prevent further missile deployment. However, the Soviet Union refused to draw back the ships that were already on their way to Cuba to deploy additional missiles. Fortunately, secret negotiations between American and Soviet diplomats caused the ships to return to the Soviet Union, right before they reached the blockade. It was a close call if those ships had tried to break the blockade, the ships would have been sunk, which probably would have led to a retaliation attack from the Soviet Union, and war would have started.
The deal between the USA and the Soviet Union was secret and has gradually been published. A part of the agreement was that the Soviet Union was going to stop deploy the missiles if the USA would draw back the nuclear missiles they had put in Turkey. To the public, it looked like Kennedy was the big winner, since all they knew was that the Soviet Union had given up their plans.