I don't believe it is illegal to travel to Cuba. Technically, it is only illegal to spend money there.
This has been covered in many threads many times. Because the very act of travelling to Cuba causes you to spend money there (a portion of your ticket pays the landing fees so you've in effect spent money) it's illegal for US Citizens to travel there.
Of course many do - On my last holiday in Cuba the guy in front of me in the customs line was from Seattle, and the guy behind me was from San Francisco

- Both had travelled on our non-stop from YVR.
Both of them entered with no problems whatsoever.