Read Decision for Disaster for the full story. Short story: JFK (the last Democrat that hated commies) supported an invasion of freedom-loving Cubans into Cuba to retake the island nation. He helped train them and promised a substantial air support effort. That air support was whittled away by risk-averse losers in the administration in the days/weeks leading up to the assault. By the time of the invasion, there was no air support and all Castro needed was a few planes to crush the invaders.
We've learned from another book that Kruschev knew of the invasion date and place four months prior.
And we've all learned that Kruschev saw the US failure as a sign of weakness. That weakness invited the Cuban Missile Crisis.
This is why we dislike communists so very very much. More death. More suffering.