The Cuban Missile was a consequence if increased hostilities between the US and The Soviet Union (The US attacked the Bay of Pigs and the Soviet Union installed Nuclear weapons in Cuba as a response and this led to the Crisis -the Us was worried about Nuclear weapons so close.)
It ended by negotiations between the two parties -US promised to not attack Cuba and Soviet Union removed the weapons.