The woman said to Him, "Sir, I perceive that You are a prophet." Our fathers worshiped on this mountain, and you Jews say that in Jerusalem is the place where one ought to worship." Jesus said to her, "Woman believe Me, the hour is coming when you will neither on this mountain, nor in Jerusalem, worship the Father. You worship what you do not know; we know what we worship, for salvation is of the Jews. But the hour is coming, and now is, when the true worshipers will worship the Father in spirit and in truth; for the Father is seeking such to worship Him. God is Spirit, and those who worship Him must worship in spirit and truth." John 4:19-24
When Jesus tells her that, "God is Spirit, and those who worship Him must worship in spirit and truth." He is telling her that the Father is to be worshiped from the heart in keeping with the truth of who He is rather than through external forms like in a physical building. In the chapter before this in John 3 Jesus is explaining this same idea that God is Spirit and that if we are to know Him, means we to must know Him in spirit as well as body. He puts it to Nicodemus like this "...Most assuredly, I say to you, unless one is born of water and the Spirit, he cannot enter the kingdom of God. That which is born of the flesh is flesh, and that which is born of the spirit is spirit. Do not marvel that I said to you, 'You must be born again.' The wind blows where it wishes, and you hear the sound of it, but cannot tell where it comes from and where it goes. So is everyone who is born of the Spirit."
Jesus is explaining to Nicodemus that we are born, not with just a body, but rather body, soul, and spirit. He explains to him that if he is to know God than it is necessary for his spirit 'be born.' He is showing him that we must all have that moment when our spirit connects with the Spirit of God. How else can we truly know Him? How else can we come into His presence? Why does our spirit need that moment when it is born and connects with His? Because God is by His very nature, His very essence, Spirit, and if we are to truly connect and know Him then it will be in that moment when our spirit connects and comes to life in Him. Jesus seems to add this afterthought about not understanding the workings of the wind and how and where it blows. Here is the thing, How else are we who are flesh and blood going to know God, who is Spirit unless it is with that part of us that is spirit as well?
I think its important to note that a belief of the Samaritans was that the Messiah would come and reveal the Father to all men. As a Samaritan this woman would have been taught that belief. Jesus tells the woman, "But the hour is coming, and now is, when the true worshipers will
worship the Father in spirit and in truth; for the Father is seeking
such to worship Him. God is Spirit, and those who worship Him must
worship in spirit and truth," In doing so, He is in fact fulfilling a messianic role, as He reveals not only the truth about the nature of God; "God is Spirit" but the Father's hearts as well; "The Father is seeking such to worship Him."