Israel is divided into three areas (think of them as provinces or states).
The southernmost is Judea. This is where Jerusalem is located. This is the where the Pharisees held the most power.
The southernmost is Judea. This is where Jerusalem is located. This is the where the Pharisees held the most power.
The middle region is Samaria. This is where the Samaritans lived (imagine that!). More on them shortly.
The northernmost area is Galilee. This area was most free of the Pharisees' influence, because it is distant from Judea, and to get to it you had to cross Samaria, and good Jews stayed out of Samaria.
Back when God was upset with Israel for her unfaithfulness to Him, he saw to it that they were overrun by the Assyrians (and Babylonians) and carried away in exile. The Assyrian king then gave the land called Samaria to some non-Jews to settle. These people intermarried with some of the Jews who escaped exile. This was not Kosher. These people asked the king to provide them with some Jewish priests to help them appease the "gods" of that area. Well, the priests at that time weren't all that in tune with God. That was part of the problem. That did not stop them from taking the job and going to Samaria to set up a religious system similar to Judaism. They even built their own temple. This put them at odds with the real Jews south of them, when they came back (under Nehemiah and others) to re-establish Israel and the real temple worship.
Jesus had a mission to accomplish. What is a mission? It's an assignment to be accomplished. Soldiers are sent on missions into enemy territory. They normally have a goal and a timetable of activity to achieve that goal. Often that goal must be realized at a specific time (like blow up the bridge when the train is crossing, not before or after, for the most effect).
Jesus' goal was the cross. He had a timetable of things he had to do to achieve that goal at exactly the right moment. This is why He would say things like, "My time is not yet come". The Father was guiding Him in that mission. If He was captured by the enemy before His time, is mission would be compromised and the goal not achieved. So there were times that Jesus was led by the Father to evade the enemy. Going to Galilee through Samaria was a way of shaking them off His tail.
So Jesus is pulling way from the Pharisees for awhile to let things calm down a bit. He's going back to Galilee, through Samaria, after the house cleaning He did in Jerusalem, where He claimed authority from His Father, and performed miracles. We only know about these miracles from Nicodemus referring to them.
He stops at a well and the guys go looking for a deli to buy something to eat.
So this woman comes to get water. She's not with other women. Jesus asks for a drink and she's shocked. He's a Jew and talking to a Samaritan and a woman at that!
Now he tells her that she should ask Him for Living Water that would never run out. She of course, doesn't get it. Previously he talked to one of the religious rulers of the Jews (about the new birth) and he didn't get it, either. Nobody gets it.
Jesus had Nicodemus' attention because of the miracles he did. Now Jesus is going to get this woman's attention by something miraculous. He's going to tell her about her personal situation.
In reply, she says He's a prophet.
So the burning question in her mind is: Is she in the right denomination? Who's correct about worshiping God, the Samaritans or the Jews?
It happens often enough. You start to talk to somebody about Jesus and they want to talk about religion. I knew a guy that always wanted to talk about some special he saw on the Discovery Channel about "God vs Satan", or the book of Revelation, or some such nonsense. Never wanted to talk about the core problem (his relationship with God) but some extraneous religious matter (who's the anti-christ?).
Jesus says that the day is coming (not yet for her, but at His resurrection) when these religious constraints on where to worship won't matter, but for now the Jews are right about where to worship.
She says, "Whatever." Actually she says, "Well... someday Messiah will come and settle it."
That's when He tells her He's the Messiah.