From the Super Mario Wiki, the Mario encyclopedia
The Castle Grounds is the area in front of Mushroom Castle in Super Mario 64 and Super Mario 64 DS. It is a hilly, grassy, area with several small trees, and a waterfall on the far left that pours into the castle's moat. There are two bridges over the moat: a wooden one that leads to the right side of the Castle Grounds, and a stone one that leads to the front door of the castle.
Super Mario 64 / Super Mario 64 DS
In Super Mario 64, Mario arrives at the Castle Grounds via a Warp Pipe upon receiving a letter from Princess Peach. When he approaches the castle, he is greeted by the Lakitu Bros. There are multiple signs in the Castle Grounds that explain the game's controls. After obtaining the key from Bowser in the Dark World, Mario can drain the moat by Ground Pounding two stone pillars in the castle's basement, which allows him to access an area underneath the moat where he can activate the Vanish Cap. After obtaining all 120 Power Stars, Mario can use the cannon next to the pond to launch himself on top of the castle, where he will find three 1-Up Mushrooms, a Wing Cap block, and Yoshi, who will max out Mario's lives and give him a special Triple Jump.
In Super Mario 64 DS, Mario, Luigi, and Wario all arrive at the Castle Grounds after Peach sends her letter. They then enter the castle to search for Peach while Yoshi is seen sleeping on the roof. When they fail to return, one of the Lakitu Bros. wakes Yoshi up, prompting him to search for them. When he tries to enter the castle, it turns out to be locked. To obtain the key, Yoshi has to chase a rabbit through a small hedge maze, which was added to the Castle Grounds in this version of the game. Later, after speaking to the Toad in the Rec Room, Yoshi can find six more rabbits in the Castle Grounds which give him keys when caught. A Black Brick was placed on top of the entrance to The Secret Under the Moat, requiring Wario to access it.
VS Mode also features the Castle Grounds as a playable course. In this mode, there is a moving platform above the pond and a Chain Chomp hopping around in front of the castle.
Mario Kart 64
The Castle Grounds return in Mario Kart 64. The area can be accessed by driving off the road to the right on Royal Raceway after the big jump, though doing so has no benefit during a race. The layout has been slightly simplified; some of the trees, as well as the small beach with the cannon on it and the waterfall, are missing. The Award Ceremony takes place here.
Though Royal Raceway returns in Mario Kart 8 and Mario Kart 8 Deluxe, the area in front of Peach's Castle (as well as the castle itself) has been redesigned and it is no longer possible to explore it.
Super Mario 64
Mario Kart 64