The Metal Cap is one of three special hats that Mario can wear to give him extra abilities. Unlike the other two caps, the Metal Cap’s secret stage is actually located inside a normal course. In order to access this secret stage, you will first need the key to the castle basement, which is gotten after clearing Bowser in the Dark World. Once you go into the basement, follow hallway into the next room and you should eventually come to the painting that leads to Lethal Lava Land. While facing this painting, go right and enter the door with a star on it (no number), placing you in the room with the entrance to Hazy Maze Cave.
Since the Metal Cap level is located in Hazy Maze Cave, jump into the course. Head down the left path at the beginning and go through the door. You will be in an area with a pit in the middle, so do your best to not fall in. Follow the walkway around and Long Jump to the section where you see boulders rolling down it. Go to the top of this incline and through the door there to arrive at an elevator, which will take you to the underground cavern. Go down to the waters and locate the blue sea creature swimming. Get on its back and perform a Ground Pound to make it lower its head, then run to stand on its head.
While on its head, you can control where the creature moves by facing in that direction. Your goal is the raised platform on the one side, with double metal doors. Once you get to that platform, go through the doors and at the end, you will find a pool you can jump into, leading to the Metal Cap level.
Cavern of the Metal Cap
This is a fairly small stage and as usual, there are eight Red Coins here to get a bonus Power Star. The Metal Cap makes Mario invulnerable to enemies, plus you are able to move underwater. Note that even with the Metal Cap equipped, you can still take fall damage. Pretty much all of the Red Coins will be near the end, so just follow the trail of enemies and platforms until you get to the little bridge. There will be two pillars in a little recess, with a 1-Up there, as well as two Red Coins. An additional two Red Coins will be found right next to the green switch.
Hit the switch to make the Green Blocks solid, then go to the platform right next tot he switch and don the Metal Cap. The final four Red Coins will be in the water, surrounding the pillar with the green switch. You will have to use the Metal Cap here, as the current is strong. Once you’ve collected all of the Red Coins, the star will also appear in the water.