Evidence is mounting indicating that S0s were once spiral galaxies that ceased forming stars and subsequently changed their morphology. Studying the timing, location and physical mechanism(s) involved in this transformation is not only interesting in itself, but it can also provide very useful clues on how galaxies evolve and the possible role of the environment. During the last few years we have been following several lines of research to test whether this transformation is indeed taking place, find out where it happens, and look for the physics driving it. At low redshift we have studied in detail the final products of the transformation - the S0s themselves - while at intermediate redshifts (z~0.5) we have concentrated on the putative progenitors - spiral galaxies - and the galaxies caught in the act of transforming. In this talk I present some of our more interesting results. Although there are still some loose ends, a coherent picture may be emerging.