Does Air Europa require you to have a tourist visa for Cuba to get on board or can I buy it at Havana Airport?
Air Europa would do what all airlines do - ensure you're legally permitted to visit the country (in this case, Cuba).
This would usually mean a check of your passport, nationality, and whether you require a visa before boarding - ie, whether or not you're able to get one on arrival in Havana.
This will depend entirely on Cuba's relationship with your country and whether or not they require you to have visas in advance.
You'll need to check with the relevant government department for your country, or one of the online visa check services. For example, New Zealanders require a visa for entry to Cuba.