It usually becomes less dense. Ice is an exception.
In almost all cases, the matter expands. Density = mass / volume. When volume increases, the density decreases, because the mass is fixed.
matter expands when heated
When matter is heated the particles in the matter gain energy and begin to move or vibrate more depending on the state in which the matter is currently in. If the heat provided is significant enough...