Super Mario 64 is a 3D platformer where the player controls Mario through several courses. Each course is an enclosed world in which the player is free to wander in all directions and discover the environment without time limits. The worlds are filled with enemies that attack Mario as well as friendly creatures that provide assistance, offer information, or ask a favor. Mario gathers stars in each course; some stars only appear after Mario has completed certain tasks, often hinted at by the name of the course. These challenges include defeating a boss, solving puzzles, racing an opponent, and gathering coins. As Mario collects stars, more areas of the castle are opened.Mario unlocks doors in the castle with keys obtained by defeating Bowser in special courses.

Mario is assisted in some courses by three cap power-ups. The Wing Cap allows Mario to fly, the Metal Cap makes him immune to most damage and allows him to withstand wind, walk underwater and be unaffected by gases; and the Vanish Cap renders him partially immaterial and allows him to walk through some obstacles such as wire mesh, as well as granting invulnerability to some forms of damage. Some courses contain cannons that Mario can unlock by speaking to a pink Bob-omb Buddy. After Mario enters a cannon, he can be shot out to reach distant places. When Mario has the Wing Cap, cannons can be used to reach high altitudes or fly across most levels quickly. There are many hidden secrets to the game, most containing extra stars needed to complete the game entirely.