John Identified the Messiah to Israel
John was sent by God the Father to identify his Son Jesus as the Messiah to the nation of Israel and to show their need for a new way to attain salvation. And he used baptism to do it!
The religious leaders knew that the messiah was bringing salvation; they had read what the prophets had written years before. They just didn't know how it was going to come about. So when they heard about John's baptism, they confronted him about it. He responded to them saying that his baptism was only with water; the real thing was yet to come. (See "Repentance" at the right.)
The next day John saw Jesus coming toward him and said, "Look, the Lamb of God, who takes away the sin of the world! This is the one I meant when I said, 'A man who comes after me has surpassed me because he was before me.'
I myself did not know him, but the reason I came baptizing with water was that he might be revealed to Israel." (John 1:29)