Yes, this is true. Let's take water for example, it has three states: liquid, solid and gas. If you want to turn water into gas (into water vapour) you need to boil it, which is applying heat. Similarly, you need to freeze it (remove heat) to turn it into a solid state.