Spirits are components of ones soul, which has 3 pillars, represented by our chackras and their frontal/back extensions and is made of 5 elements (earth, air, fire, water and akasha).
A ghost is the spirit of a deceased person, and they behaved in the way they behaved in their past life...