Super Mario 64 Official Wikia

The tutorial about caps as seen in a screenshot of Whomp's Fortress.

Caps are hats that Mario, Luigi, and Wario can wear in the games. There a total of three hats in the original game - The Wing Cap, the Vanish Cap, and the Metal Cap. Yoshi doesn't have a hat, but he can transfrom into one of the three. Mario's hat is red, Luigi's hat is green, and Wario's hat is yellow.

Cap Locations

The Wing Cap can be found in Mario Wings To The Sky.

The Vanish Cap can be found in Vanish Cap Under the Moat.

The Metal Cap can be found in Cavern of the Metal Cap.

they can be found in the Super Mario 64 and Super Mario 64 DS.

Info Sign:

"There are special Caps in the red, green and blue blocks.
Step on the switches in the hidden courses to activate the Cap Blocks.''