Phase transitions occur when a substance changes from one phase to another, such as from a liquid to a gas.