It was a baptism of repentance for sins.
“John (the) Baptist appeared in the desert proclaiming a baptism of repentance for the forgiveness of sins. People of the whole Judean countryside and all the inhabitants of Jerusalem were going out to him and were being baptized by him in the Jordan River as they acknowledged their sins.” (Mark 1:4-5).
"John wore clothing made of camel’s hair and had a leather belt around his waist. His food was locusts and wild honey. At that time Jerusalem, all Judea, and the whole region around the Jordan were going out to him and were being baptized by him in the Jordan River as they acknowledged their sins. When he saw many of the Pharisees and Sadducees coming to his baptism, he said to them, “You brood of vipers! Who warned you to flee from the coming wrath? Produce good fruit as evidence of your repentance” (Matthew 3:5-8).
"He went throughout (the) whole region of the Jordan, proclaiming a baptism of repentance for the forgiveness of sins, as it is written in the book of the words of the prophet Isaiah: “A voice of one crying out in the desert: ‘Prepare the way of the Lord, make straight his paths. Every valley shall be filled and every mountain and hill shall be made low. The winding roads shall be made straight, and the rough ways made smooth, and all flesh shall see the salvation of God.’” He said to the crowds who came out to be baptized by him, “You brood of vipers! Who warned you to flee from the coming wrath? Produce good fruits as evidence of your repentance; and do not begin to say to yourselves, ‘We have Abraham as our father,’ for I tell you, God can raise up children to Abraham from these stones” (Luke 3:3-8).