From Sonic Retro

Steam is an element that can be found in certain stages of Sonic 2, Sonic 3, Sonic 3D Blast and Sonic 4.

In Sonic 2's Metropolis Zone, steam is vented from the sides of ground-based pistons. It will harm the character and cause them to lose their shield, rings or life.

In Sonic 3's Icecap Zone, as well as Sonic 3D Blast's Diamond Dust Zone, bursts of steam will condense around the player and freeze them in ice. If the current game is with both Sonic and Tails, one character can jump on the other to free them, but otherwise they will take damage upon breaking free of the ice. In Sonic 3, steam is shot from unbreakable machines on the ceiling as well as from Robotnik's machine in the Act 2 boss.

In Sonic 4's Mad Gear Zone, pipes shoot steam out, propelling Sonic in the direction the steam shoots at high speed.