  We report a time-resolved study of the thermalization dynamics and the lasing
to photon Bose-Einstein condensation crossover by in-\textit{situ} monitoring
the photon kinetics in a dye microcavity. When the equilibration of the light
to the dye temperature by absorption and re-emission is faster than photon loss
in the cavity, the optical spectrum becomes Bose-Einstein distributed and
photons accumulate at low-energy states, forming a Bose-Einstein condensate.
The thermalization of the photon gas and its evolution from nonequilibrium
initial distributions to condensation is monitored in real-time. In contrast,
if photons leave the cavity before they thermalize, the system operates as a
laser.
