This is what Dr. Martin Luther wrote about Baptism in his Small Catechism:
What is Baptism?
Baptism is not just plain water, but it is the water wrapped in God’s command and combined with God’s word.
Which is that word of God?
Christ our Lord says in the last chapter of Matthew: “Therefore go and make disciples of all nations, baptizing them in the name of the Father and of the Son and of the Holy Spirit.” [Matt. 28:19]
What benefits does Baptism give?
It works forgiveness of sins, rescues from death and the devil, and gives eternal salvation to all who believe this, as the words and promises of God declare.
Which are these words and promises of God?
Christ our Lord says in the last chapter of Mark: “Whoever believes and is baptized will be saved, but whoever does not believe will be condemned.” [Mark 16:16]
How can water do such great things?
Certainly not just water, but the word of God in and with the water does these things, along with the faith which trusts this word of God in the water. For without God’s word the water is plain water and no Baptism. But with the word of God it is a Baptism, that is, a life-giving water, rich in grace, and a washing of the new birth in the Holy Spirit, as St. Paul says in Titus, chapter three:
“He saved us through the washing of rebirth and renewal by the Holy Spirit, whom He poured out on us generously through Jesus Christ our Savior, so that, having been justified by His grace, we might become heirs having the hope of eternal life. This is a trustworthy saying.” [Titus 3:5–8]
What does such baptizing with water indicate?
It indicates that the Old Adam in us should by daily contrition and repentance be drowned and die with all sins and evil desires, and that a new man should daily emerge and arise to live before God in righteousness and purity forever.
Where is this written?
St. Paul writes in Romans chapter six: “We were therefore buried with Him through baptism into death in order that, just as Christ was raised from the dead through the glow of the Father, we too may live a new life.” [Rom. 6:4]