From the Super Mario Wiki
Retrieved from "https://www.mariowiki.com/index.php?title=Secret&oldid=2259340"
The secrets are collectibles that appear in Super Mario 64 and the remake, Super Mario 64 DS. They are invisible items that generally produce a Power Star once five of them are collected. They can either be in 5 spots that Yoshi, Mario, Luigi, or Wario would not think to look or are hidden in secretive places such as in Wet-Dry World, or they can be overlaid with Coins, giving the impression that they are special coins that the player must collect to get a Power Star, such as in Bob-omb Battlefield and Shifting Sand Land.
Generally, they function much like the Silver Stars; once all five of them are found, a Power Star appears. However, there are other differences; if Mario (or whoever else is carrying a Silver Star) is injured for whatever reason, one of the collected Silver Stars is knocked out of their grasp, whereas the secrets collected will stay with Mario. Secrets also cannot be located on the map by any means.