Ghosting is a method of displaying wireframe ghost copies of an animated object at a number of frames before and after the current frame. Use it to analyze and adjust your animation.
When Show Ghosting is selected, ghosting is displayed for selected objects in the scene. Only currently selected objects display the ghosting.
The Viewports page of the Preferences dialog provides settings that affect the number of frames that are ghosted, before and after the current frame.
The ghosts that appear before the current frame are a different color than those that appear after the current frame. You can change these colors in the Colors page of the Preferences dialog by choosing Ghost (Before) or Ghost (After) from the Main UI list.