I was in Cuba about 18 months ago, so things might have changed a bit since then. The way to get online is like @Rimu_Atkinson mentioned to get wifi scratch cards that have a code on them you use to log on to the public hot spots. Larger cities will probably have a few hotspotsโI think Havana had about 5, perhaps a few more. Some are in parks, others at hotels. Smaller cities will have only one hotspot, if youโre lucky. Many smaller cities/towns didnโt have any hotspots at all.
To get the scratch cards, youโll have to queue up at a government run telecom shop. At certain times and locations the lines can be very long. Some places entrepreneurial locals walked around selling the scratch cards for a slight markup so you could skip the line or get access outside opening hours of the telecom shops (which can be quite limited). I recall paying $1.50 per card, but I donโt remember the duration that gave you. I think it was 60 minutes, and you donโt have to use all of it in one go. You can surf for a few minutes, download email, etc and then log out and later back on again.
Speeds are okay-ish for surfing and some places probably video calls, too. They do vary a lot, though. One location at a hotel in Havana was so slow it was barely useable, while the spot in Viรฑales was pretty snappy (probably a few Mbps down).