The Vanish Cap is one of the three Caps in Super Mario 64. Once Mario drains the moat, he can access a secret area under the drained moat outside the castle called Vanish Cap Under the Moat. Once he steps on the Blue ! Switch, they can be found in every Blue Block that he finds. When he uses it, he turns invincible and walk can through many enemies and objects.
In the DS version, when Luigi gets a Power Flower, he turns invisible in a similar fashion though there is no Blue ! Switch or Vanish Cap. There's also a few differences: Vanish Mario can walk through ice, but Vanish Luigi can't. Luigi can move horizontally and vertically, while Mario only moves horizontally.