They tried to overthrow Fidel Castro, the new communist leader of Cuba.
They wanted to overthrow him because Cuba was like America's summer playground, and they didn't like seeing a communist regime being set up in its own backyard. Now, America wanted to conceal any involvement in the plan, so they massively scaled back American air support, leading to a humiliating defeat at Cuba.
I hope this helped!
~~~Harsha~~~