From the Super Mario Wiki
Pyro Guys, originally called Flamer Guys, are Shy Guys that have somehow caught fire. They first appeared in Super Mario World 2: Yoshi's Island. If Yoshi ate one, he could breathe three shots of fire. The Pyro Guys could run faster than normal Shy Guys.
Pyro Guys appeared again in Paper Mario. They are twice as fast as normal Shy Guys and dealt more damage per attack. Pyro Guys are also weak against ice attacks. Additionally, explosive attacks, such as Bombette's Bomb attack, could easily defeat a squad of Pyro Guys.
Pyro Guys reappear in Mario vs. Donkey Kong: Minis March Again!, however their appearance is slightly different, such as the more ghost-like appearance, floating without legs, and coming in three different colors: red, blue, and yellow, to correspond with the same-colored switches. Pyro Guys are immobile enemies, and will not move regardless of what state it's in, however they are still lethal, and invulnerable to attack. When a switch of matching color is activated, Pyro Guys will turn into blocks, quelling their lethality, and can be used as steps. They are first encountered in Room 4-5.