From the Super Mario Wiki
Skull Boxes are black artillery that first appeared in Super Mario World. They fire Torpedo Teds at Mario. Much like Bill Blasters, the Skull Box cannot be destroyed.
Super Mario series
Super Mario World
Skull Boxes first appeared in Super Mario World in only one level, Soda Lake where they fire Torpedo Teds that are invincible to all available forms of attack, making the level tricky to traverse.
Super Mario Galaxy
Torpedo Teds chasing after Mario and Ted Blasters
in the background in Super Mario Galaxy
Skull Box also appear in Super Mario Galaxy, where they sport a new look and new name: Ted Blasters. They are most often found in the water, and now can be destroyed by leading a Torpedo Ted right back at them.
New Super Mario Bros. U
Skull Boxes and the Torpedo Teds in Larry's Torpedo Castle.
Skull Boxes, as well as the Torpedo Teds, return in the Wii U game, New Super Mario Bros. U. They behave and look exactly as they do in Super Mario World, and appear Larry's Torpedo Castle; they are once again invincible. Targeting Teds and Red Skull Boxes debut in The Mighty Cannonship level, being both obstacles and weapons that appear in the fight with Bowser Jr. While Torpedo Teds reappear in New Super Luigi U the Skull Boxes are absent.
Super Princess Peach
Skull Box return alongside the Torpedo Teds in the game Super Princess Peach, where they are invincible.
- A strange gloved hand drops Teds out of the boxes. It is unknown if it is organic or mechanical.