It is usually valid for 30 days and can be extended once for another 30 days at any immigration office in Cuba (for 25 CUC) - beyond this you would need a flight out of Cuba within the extended visa period.