Aims. This paper is part of a series in which we systematically compare the properties of galaxies in compact groups, loose groups, and the field. In this paper we focus our study on the age and star formation in galaxies. Methods. For galaxies in selected samples of compact groups, loose groups, and field galaxies, we compare the distributions of Dn (4000) as an age indicator and the specific star formation rate as an indicator of on-going star formation. We analyse the dependence of these parameters on galaxy type and stellar mass and, for group galaxies, their dependence on the dynamic state of the system. We study the relative fraction of galaxies dominated by old stellar populations as a function of galaxy stellar mass. We perform a similar analysis for galaxies that have high specific star formation rates. Results. Galaxies in compact groups have, on average, older stellar populations than their loose-group or field counterparts. Early-type galaxies in compact groups formed their stars and depleted their gas content more rapidly than in the other environments. We have found evidence of two populations of late-type galaxies in dynamically old compact groups: one with normal specific star formation rates and another with markedly reduced star formation. Conclusions. Processes that transform galaxies from star forming to quiescent act upon galaxies faster and more effectively in compact groups. The unique characteristics of compact groups make them an extreme environment for galaxies, where the transition to quiescence occurs rapidly.Fil: Coenda, Valeria. Consejo Nacional de Investigaciones Científicas y Técnicas. Centro Científico Tecnológico Conicet - Córdoba. Instituto de Astronomía Teórica y Experimental. Universidad Nacional de Córdoba. Observatorio Astronómico de Córdoba. Instituto de Astronomía Teórica y Experimental; ArgentinaFil: Muriel, Hernan. Consejo Nacional de Investigaciones Científicas y Técnicas. Centro Científico Tecnológico Conicet - Córdoba. Instituto de Astronomía Teórica y Experimental. Universidad Nacional de Córdoba. Observatorio Astronómico de Córdoba. Instituto de Astronomía Teórica y Experimental; ArgentinaFil: Martinez Atencio, Hector Julian. Consejo Nacional de Investigaciones Científicas y Técnicas. Centro Científico Tecnológico Conicet - Córdoba. Instituto de Astronomía Teórica y Experimental. Universidad Nacional de Córdoba. Observatorio Astronómico de Córdoba. Instituto de Astronomía Teórica y Experimental; Argentin