As energy is removed, the temperature of the liquid decreases.
If you keep removing even more energy from the liquid, then eventually its temperature reaches the melting/freezing temperature, and the liquid begins to undergo a change of state, and it changes to the solid form.