Jesus said the spring welling up to eternal life comes from his living water. The spring itself corresponds the creation of humanity from the watered ground in Genesis 2:6-7, to the spring of new life from the living water in baptism. It is from this living water well that we have life in Christ.
The shift in topic to marriage probably comes from Old Testament instances where people like Jacob find their bride at a well, and that baptism is preparation of the Christian to be in the Church, the bride of Christ (Eph 5:25-27). The Samaritan woman, having five husbands and a current lover, can be said to be adulterous and similar to ancient Samaria which was joined to five pagan nations.
Jesus points the woman and us to proper worship of God, away from a mountain or a temple, toward himself. We worship the Father in Spirit and truth. The Spirit is given to us in baptism and witnesses Christ (the way, the truth, and the life, John 14:6) to us. We are worshipping by faith in the Trinity. Jesus also uses an "I AM" statement in saying he is the Messiah, indicating to the woman that he is God in the flesh. The woman goes to her people, professing Christ to them. In so doing, she is like a spring of water, spreading living water so all may come to life in Christ.