John the Baptist more or less answered the question himself in Matthew 3:11 when he told the people, “I baptize you with water for repentance.” He meant that his baptism was the outward sign of their inner repentance from their sins and an admission of their need for God. He went on to say that Someone was coming who would baptize them with the Holy Spirit and with fire, a reference to the saving, soul-restoring ministry of the Lord Jesus Christ.
You can see in Acts 19:1-7 the story of some of John’s disciples who had been baptized by John but did not know about the coming of the Holy Spirit. In that passage the disciples explained that John baptized them for repentance and told them to believe in Jesus who was coming. They were then baptized in the name of Jesus. That tells us that John’s baptism, while a necessary step of preparation for the Jewish people of that day, was not itself Christian baptism. It meant something like, “I truly repent of my sins and I’m waiting for the One who is to come.”