From the Super Mario Wiki
Firebars are rotating rods made of fireballs first appearing in Super Mario Bros.. They are found in numerous titles throughout the Mario series. They are generally found in fortresses and act as dangerous obstacles that Mario must avoid in order to reach the goal.
Firebars were also given notable appearances in certain castles of Super Mario World 2: Yoshi's Island, which depicted them as swinging three-dimensionally. A three-dimensional Firebar depicted with eyes also appeared in Waluigi Stadium and Bowser's Castle course of Mario Kart: Double Dash!!.
 Mario series
 Super Mario Bros.
Firebars make their debut in Super Mario Bros.. Although they are not a living enemy, they are more as an obstacle as they rotate around a block in a clockwise or counter-clockwise direction. They often appear on the ceiling and floors of castles. If Mario or Luigi makes contact with one he will take damage from the fire. In later games, they are replaced with similar-acting obstacles such as Roto-Discs and Ball 'n' Chains.
 Super Mario Bros.: The Lost Levels
Firebars also appear in Super Mario Bros.: The Lost Levels. As in Super Mario Bros., they spin around in a similar fashion. In some castles, there are huge firebars with at least 14 Fireballs, unlike the normal Firebars, which usually have 6 fireballs.
 Super Mario 64
After an absence in Super Mario Bros. 3, in Super Mario 64, they appear for the first time in full 3D. They only appear in Lethal Lava Land. Unlike Firebars' 2D appearances, here they spin horizontally. Also different from their 2D appearances, there can be more than one Firebar rotating on the same axis.
 New Super Mario Bros.
In New Super Mario Bros., Firebars first appear in World 6-4. They also appear in the second tower of World 8, and a lone one appears in Bowser's Castle. Here they act just like they do in Super Mario Bros., but are found more commonly more on the ceiling and floors.
 Super Mario Galaxy
 New Super Mario Bros. Wii
In New Super Mario Bros. Wii, Firebars only appear in the tower and castle of World 8. In the tower, many are seen and one is guarding a Star Coin. There is even a double Firebar that has two rods of fire sticking out of the block. A secret room also houses a Star Coin guarded by 3 Firebars. In the castle, they are mainly seen in the first room, and only two are seen in the second room, one is even guarding another Star Coin.
 Super Mario Galaxy 2
In Super Mario Galaxy 2, the Firebars' function is the same as in Super Mario Galaxy. They mainly appear in Bowser Jr.'s Fiery Flotilla, Bowser's Gravity Gauntlet, the Slipsand Galaxy, and Bowser's Galaxy Generator. It is also of note that rotating Firebars are used during the boss battle with Bowser Jr.'s Boomsday Machine in Bowser Jr.'s Boom Bunker, where they are integrated directly into the Boomsday Machine.
 Super Mario 3D Land
 New Super Mario Bros. 2
Firebars appear again in New Super Mario Bros. 2. They have the same strategy from both predecessors. They may sometimes hide Star Coins.
 New Super Mario Bros. U
In New Super Mario Bros. U, Firebars appear once more and have a whole level based around them in Superstar Road called Fire Bar Cliffs which is home to countless Firebars of gigantic size. These huge Firebars also appear in the Meringue Clouds fortress.
 Super Mario 3D World
Firebars appear in the game Super Mario 3D World. This time some of them appear to be rotating around ? Blocks.
 Yoshi series
Firebars appear in Super Mario World 2: Yoshi's Island and its remake Yoshi's Island: Super Mario Advance 3. They appear in certain forts and castles. They are usually depicted as swinging three-dimensionally. They also reappear in Yoshi's Island DS.
 Mario Kart Wii
 Paper Mario series
 Paper Mario
In Paper Mario, the Firebars reappear in Koopa Bros. Fortress and Mt. Lavalava; this time they swing sideways. They also swing either clockwise or counter-clockwise. If Mario touches one, he loses some HP, but if Mario's partner touches one, nothing happens. Jumping over one of these Firebars causes it to swing faster. If Mario dodges one ten times, it will vanish and drop a number of coins. This is the first appearance in which Firebars can be destroyed.
 Paper Mario: The Thousand-Year Door
In Paper Mario: The Thousand-Year Door, they reappear in Bowser's third platform level. Here, they can be defeated by Bowser's firebreath. If Bowser come in contact with the fireballs, they can either decrease his size or defeat him (if he's tiny). They also appear in the Palace of Shadow and have the same behavior as they do in Paper Mario.
 Super Paper Mario
 Names in Other Languages