The baptism of John was the Old Testament practice of mikveh, a ritual immersion in a bath of water. It should be noted that this immersion had nothing to do with washing away impurities - you took a thorough bath before entering the mikveh bath. It was a symbolic act only. Mikveh was performed for several reasons, one of which addresses your question so I will explain that first.
The New Testament makes several references to the baptism of John, specifically as an act of repentance. This act of repentance was part of the atonement process before Yom Kippur, in which you expressed a turning away from your sins of the past year and beginning a new year with a renewed relationship with God. This is why the Pharisees were coming to be baptized in Matt 3:7. The problem was that they were doing it for a superficial show of piety rather than out of a true heart repentance, which is why John the Baptist rebukes them.
Like the sacrifices of the Old Covenant, the water baptism of John served for a time and was meant to show a heart that was faithful to the Lord, but it was insufficient and had to be repeated. It was merely a temporary measure given until the Spirit of the New Covenant came. Through the Spirit, we are given grace and we no longer have to repeat the acts like mikveh/baptism as they did under the Mosaic Law to maintain a ritual purity. The act of baptism for us is a once and done association with Christ. I think the man in Acts 18:25 grasped the picture of baptism, but not the fulfillment of it. I think this is the gospel of grace that Aquila and Priscilla explained to him.
More information on mikveh and the picture of believers baptism in the Old Testament (the baptism of John).
Mikveh is also an association with Mikveh Israel - the Hope of Israel or Messiah (Jer 14:8, 17:13) which is why we see the question in John 1:24-25, "Now those who were sent were from the Pharisees. And they asked him, saying, “Why then do you baptize if you are not the Christ, nor Elijah, nor the Prophet?” From this verse we can see there was an expectation that the Messiah would be known by a baptism ministry. King David also uses this word in expressing a Messianic hope as he looks toward the building of the Temple and his son Solomon on the throne: “For we are sojourners before You, and tenants, as all our fathers were; our days on the earth are like a shadow, and there is no hope [mikveh]." (1 Chr 29:15)
Other times that mikveh was performed were for changes in covenant status such as at conversion or at the time of marriage (mikveh/baptism was part of the marriage ritual for both bride and groom).
Mikveh was also practiced by the married woman after her menses and childbirth (Lev. 12,15). There is a connection between this practice and the third day of Creation. In Genesis 1:9-10, it says "Then God said, 'Let the waters below the heavens be gathered into one place, and let the dry land appear'; and it was so. God called the dry land earth, and the gathering [mikveh] of the waters He called seas; and God saw that it was good." Out of the gathering of waters came new land and new life - a beginning. Similarly, when a child is born, there is a breaking of the mother's waters to facilitate entrance into new life. It came to be practiced in the law that at the onset of a cycle of renewed life in the married woman (and this only applied to the married woman) would be marked by a mikveh - a passage through water marking the renewed hope of new life. This is the understanding behind the passages in Lev 12 and 15.
All these aspects can be seen in the Christian practice of baptism. It is the mark of beginning again with new life in Christ. It is a permanent status change marking the entrance into the New Covenant. It marks a point of turning in repentance. It is an act of associating with the Messiah and the hope of His return. All of this is wrapped into our understanding of believers baptism, which is the baptism of John.
References___________________________________
The information above came from the Jewish websites detailing the Jewish custom of mikvah, specifically from articles on mikveh and its significance for women. These articles include:
http://www.chabad.org/theJewishWoman/article_cdo/aid/1541/jewish/The-Mikveh.htm
http://www.myjewishlearning.com/article/why-immerse-in-the-mikveh/
https://www.jewishvirtuallibrary.org/jsource/Judaism/mikveh.html
http://www.mayyimhayyim.org/using-the-mikveh
http://www.jewsforjesus.org/publications/issues/v02-n10/baptism