From the Super Mario Wiki
Volcanic Smoke is an obstacle first found in New Super Mario Bros. Wii, normally seen as an enormous red-and-black cloud. It normally moves to the right very slowly. It is likely based on volcanic ash.
New Super Mario Bros. Wii
Volcanic Smoke first appeared in New Super Mario Bros. Wii, where it is solely found in World 8-1. If Mario touches it, he loses a life regardless of powerup. However, neither the Volcanic Debris nor the Buzzy Beetles are affected by it.
New Super Mario Bros. U / New Super Luigi U
Volcanic Smoke reappears in New Super Mario Bros. U in Magma-River Cruise, where it behaves the same way. It also appears in the challenge Mole to Goal Returns and in New Super Luigi U's Magmaw River Cruise.
Super Mario 3D World
Volcanic Smoke returns in Super Mario 3D World, where instead of moving right, it moves down. It also appears to generate electricity in this game. Like in past appearances, it will make the player lose a life if they touch it regardless of power-up. It appears only in Trick Trap Tower, where once it reaches the bottom, it will sink into the lava, causing it to rise. It will appear when the Key Coin at the top of the tower is collected.