In many religions, a spirit is considered to be the part of a being that is not the body. Other words with the same meanings are soul and ghost. When a body is alive, it has a spirit in it. Death is when the spirit separates from the body.
Spiritualists believe that spirits can talk with people, or change things in the world. Many religions forbid communicating with such spirits in any way, (see Leviticus 19:31) but a few include this as part of their practice.
Another use of spirit means the main purpose or meaning of a sentence or document. For example, the "spirit of a law" is the true meaning of the law which the creator wanted. This phrase is often used when the words and sentences of a law could mean more than one thing, but a judge must decide what meaning is correct.