Baptism is one of two ordinances enjoined by the Lord Jesus Christ upon believers (along with communion).
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, and teaching them to obey everything I have commanded you. And surely I am with you always, to the very end of the age." (Matthew 28:19-20 NIVUS)
It is both a duty and a privilege, but it is not a saving act.
For it is by grace you have been saved, through faith-- and this not from yourselves, it is the gift of God-- not by works, so that no one can boast. (Ephesians 2:8-9 NIVUS)
It is by faith in Jesus Christ alone through the power of the Holy Spirit.
he saved us, not because of righteous things we had done, but because of his mercy. 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, (Titus 3:5-6 NIVUS)
Baptism by immersion best depicts the truth of our death, burial and resurrection with Christ as a new creation by faith in His death, burial and resurrection.
We were therefore buried with him through baptism into death in order that, just as Christ was raised from the dead through the glory of the Father, we too may live a new life. If we have been united with him like this in his death, we will certainly also be united with him in his resurrection. For we know that our old self was crucified with him so that the body of sin might be done away with, that we should no longer be slaves to sin-- because anyone who has died has been freed from sin. Now if we died with Christ, we believe that we will also live with him. For we know that since Christ was raised from the dead, he cannot die again; death no longer has mastery over him. The death he died, he died to sin once for all; but the life he lives, he lives to God. In the same way, count yourselves dead to sin but alive to God in Christ Jesus. (Romans 6:4-11 NIVUS)
In this act of obedience is the testimony of a new life emerged by faith in Him.
Therefore, if anyone is in Christ, he is a new creation; the old has gone, the new has come! (2 Corinthians 5:17 NIVUS)
This new life is the life of Christ in the believer.
I have been crucified with Christ and I no longer live, but Christ lives in me. The life I live in the body, I live by faith in the Son of God, who loved me and gave himself for me. (Galatians 2:20 NIVUS)
This baptism acts as the sign of the New Covenant for the New Testament believer, replacing the sign of the Old Covenant.
In him you were also circumcised, in the putting off of the sinful nature, not with a circumcision done by the hands of men but with the circumcision done by Christ, having been buried with him in baptism and raised with him through your faith in the power of God, who raised him from the dead. (Colossians 2:11-12 NIVUS)
And it is a sign of holiness through the call of God.
to make her holy, cleansing her by the washing with water through the word, (Ephesians 5:26 NIVUS)
Like the Ethiopian said whom Philip evangelized,"Look, here is water. Why shouldn't I be baptized?" And you will go on your way rejoicing. (Acts 8:26 NIVUS)
So baptism is an act of obedience in public identification with Christ, a visible stepping over the line (1Jn. 5:11-12), an irreversible casting of your lot unashamedly (Lk. 9:26) on the side of Christ.