That statement is almost always false. When anything is heated, it expands ... with one tiny exception.
When water is heated from 0°C to 4°C, it contracts. I'm pretty sure that this is the only place in nature where this exception to the rule occurs. If it didn't, then life on Earth wouldn't be possible !