Ghosts are enemies (loosely) from the Mario Kart series.
Ghosts are projections of a previous time trial that was left behind by a racer, they act and drive according to the last racer's movements exactly. They are implemented for a racer's goal to race faster than the current fastest time. They are not prone to losing control when a racer rams them from the side, the racer will simply pass through them, with the ghost not showing any sign of realizing what happened. Racing a ghost at any time trial is completely optional.
When Mario Kart reached the age of online play, racers gained the ability to send ghost data to friends to challenge them. After beating certain times in Time Trial mode, pre-recorded ghosts made by staff can also be challenged.