Cuba was ruled by the dicatator Baptiste. Baptiste exploited the people of Cuba, which made the people of Cuba poor, and made Baptiste and his friends rich. Baptiste was brutal and oppressive, and violated the rights of the people of Cuba, and was hated by the people of Cuba. The people of Cuba wanted to get rid of Baptiste, but Baptiste was supported by America and the CIA. Then Fidel Castro rebelled against Baptiste. The determination of the cuban people to get rid of Baptiste was so great that they were able to defeat Baptiste, America, and the CIA. Afterwards the cuban people wanted to have nothing to do with America so that America could never again impose a corrupt, oppressive dictatorship on Cuba.
There is another, less common version of the story of the cuban revolution which is like this:
Cuba was ruled by the dicatator Baptiste. The people of Cuba saw that Amercia had free elections and that life was better in America, and so the people of Cuba wished that they could have free elections too.
Meanwhile in America, the propaganda of Franklin Roosevelt had portrayed the second world war as a war of dictatorships versus democracies. This was not true; enemies Finland, Germany, Italy, Hungary, and Japan were freer and had more elections than allies Russia and China. West Germany, Italy, and Japan made the transition to elected government after the war easily because they had rudimentary elections before the war. Establishing elections in Taiwan and South Korea was more difficult because they had no history of elections. But the cult of Franklin Roosevelt was so strong that the myth was accepted as fact and incorporated into school textbooks. Fortunately most people soon forget all the lies they are taught in school; otherwise civilization would have been destroyed long ago. The second world war seemed to show that dictatorships start wars, elected governments do not start wars. So America worried about the dictatorship in Cuba. Also America felt sorry for people of Cuba. So America tried to encourage Baptiste to allow free elections, or at least to allow the cuban people more freedom. Also America encouraged the people of Cuba to demand free elections, or at least more freedom.
When Fidel Castro began advancing on Havana with his small army, most people in Cuba wanted to get Baptiste and have free elections. This included many people in Baptiste's government and army. The people of Cuba supported Castro because they believed that Castro would give the people of Cuba free elections. Baptiste's poorly paid, poorly equipped, and demoralized army deserted, and there was very little fighting.
America discouraged Baptiste from resisting and encouraged Baptiste to give up. But America did nothing else. America thought that most people in Cuba wanted free elections, and the best thing for America was to keep out of the way and let the people of Cuba achieve this for themselves.
The opposition to Baptiste accepted Castro as the temporary leader because Castro had the only non-Baptiste army. Castro would be able to maintain law and order and protect the future elections without relying on Baptiste's army. Also Castro had few supporters among the middle class people of Havana who wanted free elections, so they thought Castro was not a serious candidate and would be neutral while they elected a real leader.
But Castro kept delaying elections. Castro would not share power with the rest of the opposition to Baptiste. Castro began attacking people who wanted free elections.
The reason that Castro had an army and the rest of the opposition to Baptiste did not have an army was that Castro wanted to use violence, while the rest of the opposition to Baptiste wanted reform without violence. By choosing the temporary leader with the biggest non-Baptiste army, the opposition to Baptiste had choosen the most violent temporary leader.
As the opposition to Baptiste and the people of Cuba realized that Castro was betraying and stealing the revolution, they turned against Castro. Communists and anti-communists shot each other on the streets of Havana. A civil war began in Cuba.
America was concerned about the civil war in Cuba. But America thought that most people in Cuba wanted free elections and friendship with America, and the unpopular communists would inevitably lose. So America encouraged the anti-communists, but mostly did nothing.
The communists were more willing to lie, more brutal, more violent, more willing to murder the families of their opponents, and less concerned about the rights of civilians. This gave the communists an advantage. The communists won the civil war.
It often happens that the most faction which is most violent wins civil wars. See The bad guys usually win civil wars.