Worship In Spirit

What does it mean when it says that God is a spirit and we must worship him in spirit?

Here is the passage to which you are referring:

John 4:23But the hour cometh, and now is, when the true worshippers shall worship the Father in spirit and in truth: for the Father seeketh such to worship him.
See All... But the hour cometh, and now is, when the true worshippers shall worship the Father in spirit and in truth: for the Father seeketh such to worship him. 24 God is a Spirit: and they that worship him must worship him in spirit and in truth.

Here is another similar passage:

Philippians 3:3God came from Teman, and the Holy One from mount Paran. Selah. His glory covered the heavens, and the earth was full of his praise.
See All... For we are the circumcision, which worship God in the spirit, and rejoice in Christ Jesus, and have no confidence in the flesh.

We must first consider the context of John 4:24God is a Spirit: and they that worship him must worship him in spirit and in truth.
See All.... John 4:19-24[19] The woman saith unto him, Sir, I perceive that thou art a prophet.
[20] Our fathers worshipped in this mountain; and ye say, that in Jerusalem is the place where men ought to worship.
[21] Jesus saith unto her, Woman, believe me, the hour cometh, when ye shall neither in this mountain, nor yet at Jerusalem, worship the Father.
[22] Ye worship ye know not what: we know what we worship: for salvation is of the Jews.
[23] But the hour cometh, and now is, when the true worshippers shall worship the Father in spirit and in truth: for the Father seeketh such to worship him.
[24] God is a Spirit: and they that worship him must worship him in spirit and in truth.
See All... makes up one unified piece. In order to take Jesus off track in His witnessing approach, the Samaritan woman brought up the argument between the Jews and the Samaritans as to where God should be worshipped. Should He be worshipped in Samaria as the Samaritans say or in Jerusalem as the Jews claim? Although Jesus maintained the authority of the Jewish teachings ("salvation is of the Jews"), He pointed to the time when the Father will not be worshipped in a particular location ("neither in this mountain, nor yet at Jerusalem'). The reason for this development has to do with the essential nature of God. He is a Spirit and therefore His worship is not limited to a physical location. True worship of Him is not physical worship in a physical location; it is spiritual worship. The point of the argument contrasts the physical with the spiritual and declares that God is spiritual; not physical.

Historically, physical worship meant that worship was limited to going to one particular place and physically acting in certain ways (as in taking offerings to the Temple in Jerusalem). However, true worship is spiritual; not physical. It is the worship of the inner man and is not found in the outward actions of the flesh. Even when physical actions are connected to worship (as the singing of praise to God and the offering of financial gifts), the true worship is not to be found in the outward actions but in the condition of the heart. Songs can be sung and money can be given in an outward manner without the full participation of the spiritual man. These actions are then not true worship. True worship is that which comes from the inner man and the Father seeks such to worship Him (John 4:23But the hour cometh, and now is, when the true worshippers shall worship the Father in spirit and in truth: for the Father seeketh such to worship him.
See All...).

The word worship comes from worth+ship. It means to declare the worthiness of (Revelation 5:9-12[9] And they sung a new song, saying, Thou art worthy to take the book, and to open the seals thereof: for thou wast slain, and hast redeemed us to God by thy blood out of every kindred, and tongue, and people, and nation;
[10] And hast made us unto our God kings and priests: and we shall reign on the earth.
[11] And I beheld, and I heard the voice of many angels round about the throne and the beasts and the elders: and the number of them was ten thousand times ten thousand, and thousands of thousands;
[12] Saying with a loud voice, Worthy is the Lamb that was slain to receive power, and riches, and wisdom, and strength, and honour, and glory, and blessing.
See All... - "Worthy is the Lamb that was slain to receive power, and riches, and wisdom, and strength, and honour, and glory, and blessing"). Therefore, worship is not limited to a place or the performance of a ceremony. Rather, it is an inward attitude of reverence and exaltation expressed by an outward act of praise (Psalm 29:2Give unto the LORD the glory due unto his name; worship the LORD in the beauty of holiness.
See All... - "Give unto the LORD the glory due unto his name; worship the LORD in the beauty of holiness"). According to the passage in John 4:22-24[22] Ye worship ye know not what: we know what we worship: for salvation is of the Jews.
[23] But the hour cometh, and now is, when the true worshippers shall worship the Father in spirit and in truth: for the Father seeketh such to worship him.
[24] God is a Spirit: and they that worship him must worship him in spirit and in truth.
See All..., true worship has three characteristics. First it is sane (John 4:22Ye worship ye know not what: we know what we worship: for salvation is of the Jews.
See All...) - "we know what we worship" (1 Corinthians 14:14-15[14] For if I pray in an unknown tongue, my spirit prayeth, but my understanding is unfruitful.
[15] What is it then? I will pray with the spirit, and I will pray with the understanding also: I will sing with the spirit, and I will sing with the understanding also.
See All..., 26-33; Colossians 3:16Let the word of Christ dwell in you richly in all wisdom; teaching and admonishing one another in psalms and hymns and spiritual songs, singing with grace in your hearts to the Lord.
See All...). Second, it is spiritual (John 4:24God is a Spirit: and they that worship him must worship him in spirit and in truth.
See All...) - "in spirit." Third, it is sincere (John 4:24God is a Spirit: and they that worship him must worship him in spirit and in truth.
See All...) - "in truth."

Notice that we are to worship God in spirit and in truth (John 4:24God is a Spirit: and they that worship him must worship him in spirit and in truth.
See All...). The phrase "in truth" is used in important ways in scripture. It means that our heart must match our deeds (1 John 3:18My little children, let us not love in word, neither in tongue; but in deed and in truth.
See All... - "My little children, let us not love in word, neither in tongue; but in deed and in truth.") It means to act without hypocrisy. Philippians 1:18See All... contrast two opposites: "whether in pretence, or in truth." That which is done in truth is not pretended or faked. Therefore, to act in truth is to act without falsehood and without fear of what others think. The Jews said of Jesus: "for thou regardest not the person of men, but teachest the way of God in truth" (Mark 12:14And when they were come, they say unto him, Master, we know that thou art true, and carest for no man: for thou regardest not the person of men, but teachest the way of God in truth: Is it lawful to give tribute to Caesar, or not?
See All...). To worship God in spirit and in truth is the highest form of worship and the only kind of worship God ultimately desires.

The question may arise as to what the spirit is. According to Romans 8:16The Spirit itself beareth witness with our spirit, that we are the children of God:
See All..., "The Spirit itself beareth witness with our spirit, that we are the children of God." The spirit of man is that part of him that communicates with God's Spirit and that on a moment by moment basis receives its life from God's Spirit. The Holy Spirit works in our heart through our spirit. "But the natural man receiveth not the things of the Spirit of God: for they are foolishness unto him: neither can he know them, because they are spiritually discerned" (1 Corinthians 2:14But the natural man receiveth not the things of the Spirit of God: for they are foolishness unto him: neither can he know them, because they are spiritually discerned.
See All...). The natural man is the lost man, being what he is by nature alone. The spiritual man (the one who has his spirit quickened in salvation and is in submission to God) receives the things of the Spirit of God and responds to that Spirit.

As such, we can do as did Paul when he said, "For God is my witness, whom I serve with my spirit in the gospel of his Son" (Romans 1:9For God is my witness, whom I serve with my spirit in the gospel of his Son, that without ceasing I make mention of you always in my prayers;
See All...). We can pray, both in the spirit and in the Spirit (1 Corinthians 14:15What is it then? I will pray with the spirit, and I will pray with the understanding also: I will sing with the spirit, and I will sing with the understanding also.
See All...; Ephesians 6:18Praying always with all prayer and supplication in the Spirit, and watching thereunto with all perseverance and supplication for all saints;
See All...; Jude 1:20But ye, beloved, building up yourselves on your most holy faith, praying in the Holy Ghost,
See All...). And, we can worship God in spirit and in the spirit; that is, in the inner spiritual man. May we all learn to worship our Lord in such a manner.