When a substance is compressed, its molecules are brought closer together, resulting in an increase in density. For example, when water is compressed, its molecules are packed tightly together, which increases its density. On the other hand, when the compression is released, the molecules move freely and the substance returns to its normal state. An example of this would be a gas, such as helium. When compressed, the gas molecules become tightly packed, but when the pressure is released, the molecules move farther apart, returning to their original state.