Wilhelmus a Brakel:
Objection #2: Small children are baptized who do not as yet have understanding and are as yet unable to be believingly exercised with their baptism in order to be sealed by it. Baptism either has no efficacy—and is thus administered to them in vain—or by reason of inherent efficacy must beget grace in a natural sense. Since the first concept is absurd, the second is therefore confirmed.
Answer 1) The children in the Old Testament were circumcised and their circumcision was not in vain; it nevertheless had no inherent efficacy to circumcise the heart. It is thus evident that a child‟s reception of a sacrament can be of benefit, even though the sacrament has no inherent efficacy to beget grace. 2) Since baptism functions as a sign and a seal, a child can likewise be sealed. God, the congregation, and thus also the parents, view him as being sealed. The parents derive their comfort from this, and the baptized child, upon coming to the years of discretion, derives from his baptism its sealing efficacy to his comfort and sanctification. (TCRS, vol. 2, p. 502).
Read more on how baptism saves: http://thepresbyteryinn.com/2016/08/12/how-baptism-saves-you/