What happens to matter when it is heated