Because America’s part of the agreement was kept secret, Khrushchev appeared to have ‘lost’. The reality is that both sides made concessions.
The 
Cuban Missile Crisis, also known as the October Crisis of 1962 (
Crisis de Octubre), the Caribbean Crisis (
Карибский кризис, Karibsky krizis), or the Missile Scare, was a 
13-day (October 16–28, 1962) confrontation between the 
United States and the 
Soviet Union initiated by Soviet 
ballistic missile deployment in 
Cuba. The confrontation is often considered 
the closest the 
Cold War came to escalating into a full-scale 
nuclear war.
In response to the failed 
Bay of Pigs Invasion of 1961 and the presence of American 
Jupiter ballistic missiles in 
Italy and 
Turkey, Soviet leader 
Nikita Khrushchev agreed to Cuba's request to place nuclear missiles on the island to deter a future invasion. An agreement was reached during a secret meeting between Khrushchev and 
Fidel Castro in July 1962, and construction of a number of 
missile launch facilities started later that summer.
Meanwhile, the 
1962 United States elections were under way, and the White House had denied charges for months that it was ignoring dangerous Soviet missiles 90 miles (140 km) from Florida. The missile preparations were confirmed when an Air Force 
U-2 spy plane produced clear photographic evidence of 
medium-range (SS-4) and 
intermediate-range (R-14) ballistic missile facilities.
When this was reported to President 
John F. Kennedy he then convened a meeting of the nine members of the 
National Security Council and five other key advisers in a group that became known as the 
Executive Committee of the National Security Council (EXCOMM). After consultation with them, Kennedy ordered a naval blockade on October 22 to prevent further missiles from reaching Cuba. The US announced it would not permit offensive weapons to be delivered to Cuba and demanded that the weapons already in Cuba be dismantled and returned to the Soviet Union.
After several days of tense negotiations, an agreement was reached between Kennedy and Khrushchev. Publicly, the Soviets would dismantle their offensive weapons in Cuba and return them to the Soviet Union, subject to 
United Nations verification, in exchange for a US public declaration and agreement to avoid invading Cuba again. Secretly, the United States agreed that it would dismantle all US-built 
Jupiter MRBMs, which had been deployed in Turkey against the Soviet Union; there has been debate on whether or not Italy was included in the agreement as well.
When all offensive missiles and 
Ilyushin Il-28 light bombers had been withdrawn from Cuba, the blockade was formally ended on November 21, 1962. The negotiations between the United States and the Soviet Union pointed out the necessity of a quick, clear, and direct communication line between the two Superpowers. As a result, the 
Moscow–Washington hotline was established. A series of agreements later reduced US–Soviet tensions for several years until both parties began to build their nuclear arsenals even further.
https://en.wikipedia.org/wiki/Cuban_Missile_Crisis .