I am not a pastor or a trained theologian, just a layman with experience in theological polemics and somewhat well read. I attempted to answer a question regarding Baptism on the Witternberg Trail. This post is lightly modified from a Forum entry I wrote there.
What -- exactly -- happens when a person is baptized?
We are washed by God with the water and the Word. The Word, or the promises in the gospel, come with the Holy Spirit. This is a way God has of bringing us into Christ, of grafting us into the vine, so to speak. I want to add something, because many Protestants have a lot of problems with this idea. It is not water that washes us, but water with the Word that washes us. Water is good for washing away filth, water with the Word is good for washing away sin, death and our slavery to the devil. Baptism is God's promises, a spiritual thing, united with material, water. This is an important thing to understand, because if we miss this, we will miss a lot of what Lutheranism is about.
A good analogy for uniting spiritual things to material things is the Incarnation, where the Word became man, was born of a virgin, wet his shorts etc. It was not a mere man who saved us, but a man who is also God, united in the person of Christ. God and man in one person. In a similar way, God's promise, the Holy Spirit etc. are united with the water in Baptism. We believe this because we believe God's promises.
Does this answer change if the person is an infant?
No.
How do you know this is true? What are the Biblical texts?
Eph 5:25-27
25 Husbands, love your wives, as Christ loved the church and gave himself up for her, 26that he might sanctify her, having cleansed her by the washing of water with the word, 27so that he might present the church to himself in splendor, without spot or wrinkle or any such thing, that she might be holy and without blemish.
This passage is not directly referring to Baptism. But I hope you will notice that there is a washing of water with the word with the effects of cleansing, and leaving without blemish. As I said, water by itself cannot do this, but water with the Word can make us holy and without blemish.
Titus 3:4-7
4But when the goodness and loving kindness of God our Savior appeared, 5he saved us, not because of works done by us in righteousness, but according to his own mercy, by the washing of regeneration and renewal of the Holy Spirit, 6whom he poured out on us richly through Jesus Christ our Savior, 7so that being justified by his grace we might become heirs according to the hope of eternal life.
While the word "baptism" does not appear here, I believe this is a clear teaching that Baptism brings renewal and rebirth, because it washes away our filth, as the passage above says.
Of course, there is always this:
John 3
1Now there was a man of the Pharisees named Nicodemus, a ruler of the Jews. 2This man came to Jesus by night and said to him, "Rabbi, we know that you are a teacher come from God, for no one can do these signs that you do unless God is with him." 3Jesus answered him, "Truly, truly, I say to you, unless one is born again he cannot see the kingdom of God." 4Nicodemus said to him, "How can a man be born when he is old? Can he enter a second time into his mother’s womb and be born?" 5Jesus answered, "Truly, truly, I say to you, unless one is born of water and the Spirit, he cannot enter the kingdom of God.
Again, we see Jesus uniting water with the Spirit, which is another way of saying water and the Word. And let's not forget St. Peter's "Baptism now saves us".
There are other allusions to Baptism throughout the NT, but I hope these will suffice for now.
So, that is my pocket sized justification for our doctrine of Baptism. Whole books have been writen abo tthe subject, but I hope this suffices at least for now.