In popular culture the words ghost, and spirit are used usually interchangeably though it is important to remember that these words are different concepts in the understandings of parapsychology, and spirituality.
Spirits are usually seen as entities that have passed over into the afterlife through the veil, or are entities that reside on a higher plane. Many entities are considered to be spirits such as loved ones and ancestors that have crossed over, nature spirits, and deities.
Ghosts are entities that have been trapped, or attach themselves to the physical plane after their physical bodies usually sudden, or tragic death. Ghost will become spirits after they go through the process of passing over the veil into the higher plane of existence.
The parapsychologist Hans Holzer was the first to devise this specific type of separation between these terms within his books. This gave us the understanding of spirit and ghost being separated in these ways.