From the Super Mario Wiki, the Mario encyclopedia
Switch Barrels are an uncommon type of barrel in Donkey Kong Country 3: Dixie Kong's Double Trouble! that have an "S" printed on them (which likely represents "switch"). They only appear in three levels: Blazing Bazukas, Koindozer Klamber, and Criss Kross Cliffs.
The Switch Barrel displays either a barrel, TNT Barrel, or a Steel Keg: it displays the same type of barrel as the ones fired out by Bazukas. If Dixie Kong and Kiddy Kong jump at a Switch Barrel, it changes to another barrel, and the Bazuka starts firing out that type of barrel. The Kongs can revert to the initial barrel by jumping at the Switch Barrel again.
Switch Barrels first appear in the level Blazing Bazukas, which they appear throughout. the Bazukas are usually firing TNT Barrels, and the Switch Barrels can change them to regular barrels. This is required for them to get across the area. There is one Switch Barrel in the level that alternates between barrels and Steel Kegs. The Steel Kegs are needed to defeat Koin and obtain the level's DK Coin.
Only one Switch Barrel appears in Koindozer Klamber. Like Blazing Bazukas, the Switch Barrel is used to defeat the Koin and acquire its DK Coin, and it alternates between barrels and Steel Kegs.
Switch Barrels are an integral feature to Criss Kross Cliffs, and every one in the level alternates between Steel Kegs and TNT Barrels. The Steel Kegs are used to bounce Dixie and Kiddy higher into the level, and along the way, the Kongs encounter red Buzzes blocking the path. The Kongs can only defeat them with a Switch Barrel, which changes the Steel Kegs to TNT Barrels. After defeating the enemy, Dixie and Kiddy can change back to Steel Kegs and continue in the level.