Watch this railroad tanker car instantly implode...
In the clip, the tanker car is filled with steam and the safety valves are disabled. The steam cools, then condenses, the pressure inside drops, and the pressure difference is big enough to crumple that huge railcar like a napkin.
That's one extreme, caused by cooling. There's also a link to a video showing "sun kink", another failure mode caused by intense heat. According to Wikipedia:
Similarly, rail tracks also expand when heated, and can fail by buckling, a phenomenon called sun kink. It is more common for rails to move laterally, often pulling the underlain railroad ties (sleepers) along.