Batista was a very corrupt dictator, with US support; the mob had a large presence in the country. The people were greatly dissatisfied with the government, and supported its overthrow.
Castro led a remarkable revolution, that overthrew the government. Reportedly, he had approached the US, then with Nixon handling Cuban issues after Eisenhower's stroke, wanting to have a good relationship as a socialist country, and Nixon refused, leading Castro to ally with the USSR as a communist.
Castro created a strong authoritarian government and communist system. It failed pretty badly, with things like low crop yields, dependent on Soviet subsidies. GDP per capita plummeted. He also did some good things - greatly increasing literacy and training doctors. As Wikipedia notes:
"Before 1959 the literacy rate for Cuba was approximately 77%, as noted by UNESCO. This was the 4th highest rate in Latin America. The Cuban government of Fidel Castro at Che Guevara’s behest dubbed 1961 the "year of education" and sent "literacy brigades" out into the countryside to construct schools, train new educators, and teach the predominantly illiterate guajiros (peasants) to read and write. The campaign was "a remarkable success” although some participants recalled it as an indoctrination program to support the party. By its completion, 707,212 adults were taught to read and write, raising the national literacy rate to 96%."
US politics at the time were the height of the cold war. Gallup polls showed the American people said Cuba was the #1 threat in the world. Politics demanded the government oppose Castro. Nixon tried and failed to launch a US invasion under cover of Cuban exiles before the 1960 election, and failed; JFK inherited plan expanded by the CIA that had been overthrowing so many government, which misled him into supporting it, despite his prohibition on US military involvement, and it became the disastrous Bay of Pigs, which led to end of Allen Dulles' career leading the CIA's plots, for what RFK called 'virtually treason' against JFK in the operation. JFK instead initiated a complete economic boycott in place to this day.
Yet JFK did not plan a long boycott; he was interested in ending the conflict, either by the overthrow of Castro, or by negotiating an agreement with him. His private representative was secretly meeting with Castro to begin negotiations to end the conflict.
Back to the evil of Cuba. The US does not want to copy the system of Cuba. It's poorer, and heavily state controlled, owning most industry and employing most Cubans. That doesn't mean the US shouldn't and doesn't want to have some more government-run systems; we already have such things as public water systems, public libraries, public education, public power in some areas such as the TVA, and many more.
Popular areas for expansion include things like ending the very poor privatized prison industry, avoiding privately owned highways, not going too far in private education (there has been a high rate of problems with for-profit 'colleges'), and Medicare for All. Back to Cuba, Wikipedia:
"The government of Cuba owns and operates most industries and most of the labor force is employed by the state. Following the fall of the Soviet Union in 1991, the ruling Communist Party of Cuba encouraged the formation of worker co-operatives and self-employment. However, greater private property and free market rights were granted by the 2019 Cuba Constitution. It has also been acknowledged that foreign market investment in various Cuban economic sectors increased before 2019 as well.
As of 2000, public-sector employment was 76% and private-sector employment (mainly composed of self-employment) was 23% - compared to the 1981 ratio of 91% to 8%. Investment is restricted and requires approval by the government. The government sets most prices and rations goods to citizens. In 2016 Cuba ranked 68th out of 182 countries, with a Human Development Index of 0.775, much higher than its GDP per capita rank (95th). As of 2012, the country's public debt comprised 35.3% of GDP, inflation (CDP) was 5.5%, and GDP growth was 3%.
Housing and transportation costs are low. Cubans receive government-subsidized education, healthcare and food subsidies."
About that 'Human Development Index'. It ranks Cuba 30th of 176 nations in life expectancy; second in literacy with 99.8%; sixth in primary school enrollment; 17th of 135 in the 'human poverty index' (lower is better).
Cuba has essentially no homelessness; reportedly, homelessness is illegal; if a person is homeless, the government provides them housing (the US has an estimated 500,000 homeless).
1/2