A tourist visa is normally valid for 30 days. There may be circumstances under which you may be able to renew it with local Immigration where you are staying.
It would be better to check with the Cuban Consulate in your country before you travel. Failing that, check with the authorities on arrival. However, it is NOT advisable, under any circumstances, to overstay your visa without prior permission.