Even if you are not a US citizen, if you’re flying through the US, or have residency / a visa in the US, you will still need to follow the same regulations. Here’s what you'll need to do to travel there:
Choose one of the 12 categories of travel. You simply need to declare which category you choose, both while booking anything and when returning back to the US. The Support for the Cuban People category is typically the easiest category to fit into.
Book a flight and then your airline will instruct you on where to purchase a Cuban Tourist Card. This is a Cuban government requirement, and has nothing to do with the 12 permitted categories of travel.
The easiest way to get a tourist card is during the pre-boarding process at the airport prior to departure. Once you book your flight, the airline will provide details on the process but it usually takes place at the check-in desk or at a kiosk located at the flight's departure gate. Alternatively, you can purchase the tourist card online, but it usually costs extra to do so.