Ghosts are replays of Time Trials which a player can save after completing one. The player can race against these ghosts on the track that the ghost was saved on. In Mario Kart 64, Ghosts were saved on Controller Paks. As such, ghosts can't be saved in the Virtual Console version of the game.
In Mario Kart Wii, if a player can defeat a first tier Staff Ghost they may unlock an expert staff ghost. These expert staff ghosts are the second and last tier of time-trial built in ghosts. Funky Kong, Baby Luigi and Mii Outfit B are unlocked by defeating first tier ghosts. To unlock Funky Kong you had to defeat 4 staff ghosts. To unlock Baby Luigi, you had to defeat 8 staff ghosts. To unlock Mii outfit B, you had to defeat all staff ghosts.
Often, the player starts out with three Mushrooms. However, in Super Mario Kart, the player starts out with none. Also in Mario Kart: Double Dash!! the player starts out with two, one for each character. Finally, in Mario Kart DS, the amount of Mushrooms the player starts out with depends on the Item stat of their kart, ranging from one to three.
In the first three games, the engine class and speed is fixed in 100cc, while Double Dash!! onward have its engine class set and fixed on 150cc. In Mario Kart 8 Deluxe, there are options to do time trials on 200cc and 150cc. Staff ghosts differ between each of the three engine classes.