When you ask Jesus to be your Lord and Savior and ask for forgiveness of all your sins and repent or turn from your sins then you are saved or born again.
2 Corinthians 5:17
Therefore, if anyone is in Christ, he is a new creation; old things have passed away; behold, all things have become new.
IN John 3 it says
1Now there was a man of the Pharisees named Nicodemus, a member of the Jewish ruling council. 2He came to Jesus at night and said, "Rabbi, we know you are a teacher who has come from God. For no one could perform the miraculous signs you are doing if God were not with him."
3In reply Jesus declared, "I tell you the truth, no one can see the kingdom of God unless he is born again.[a]"
4"How can a man be born when he is old?" Nicodemus asked. "Surely he cannot enter a second time into his mother's womb to be born!"
5Jesus answered, "I tell you the truth, no one can enter the kingdom of God unless he is born of water and the Spirit. 6Flesh gives birth to flesh, but the Spirit[b] gives birth to spirit. 7You should not be surprised at my saying, 'You[c] must be born again.' 8The wind blows wherever it pleases. You hear its sound, but you cannot tell where it comes from or where it is going. So it is with everyone born of the Spirit."
Now that being said.. Baptism is an act of obedience
Christian baptism has at least one very important sort of a precursor and that is Judaistic proselyte baptism. Before the New Testament…let’s say a Gentile had come to the knowledge of the true God. Some Gentile had heard the prophets or he had heard the testimony of a faithful Israelite or he’d come to Israel and he moved into the land and he took up residence there. Or he lived on the border or whatever and he was exposed to the living and true God, God moved upon his heart…he came to believe in the true and living God, he repented of his sin, and he became a follower of the true God, and he was a saved individual—a saved Gentile—who wanted to identify with God’s people, he would be called a proselyte. He had been proselytized, if you will—he was now a proselyte to Judaism. He was a Gentile wanting to become identified with the Jews and worship their God—like Cornelius would be, in the New Testament. Now, he would have to go through a three-stage ceremony… the Jews had developed a ceremony by which a proselyte would enter into privilege in the covenant community.
Jesus showed up in Matthew 3:13 and He comes to John to be baptized by John—this is quite remarkable. Well, he can’t handle this, verse 14, "John tried to prevent Him, saying, "I have need to be baptized by You and You come to me?" This doesn’t make sense! You don’t need to reject Your old life. You don’t need to repent of anything—You’re sinless, holy, and undefiled. You don’t need to say no to the past and yes to the future. You don’t need to have some death to the old symbolized, and some resurrection to the new dramatized—that doesn’t make sense. This doesn’t fit You." But, Jesus answering said to him, "Permit it at this time, for this is just for now—it needs to be done, for in this way it is fitting for us to fulfill all righteousness." Then he permitted him." Why did He do this? Well, He says it: "to fulfill all righteousness." Listen; that’s so important. John understood baptism to be the confession of sin. John understood baptism to be repentance. John understood baptism to be the death of the old life, to rise and walk in new life. But, Jesus didn’t need to do that. He was sinless. The whole idea of this baptism was to prepare sinners to receive the sinless King, so John tried to prevent Him, but Jesus said, "No. I have to do this for now because I need to fulfill all righteousness."
Well, what does he mean by that? Some people say, "Well, He wanted to identify with the people who were getting ready for Him." That’s possible. Others have said that, "He wanted to set the example for believers in the future." I think that’s very possible—that’s getting close. But, let me just kind of cap it off. What He wanted to do was fulfill all righteousness and for us, all righteousness would include what? Baptism. If you’re going to fulfill all the righteousness that God asks of you, you’re going to be baptized. I think Jesus…you know His life was imputed to us, our sins were imputed to Him, His righteous life imputed to us…and He fulfilled all righteousness…all righteousness.
Yes, it was a symbol of His coming death. Yes, it was a symbol of His coming resurrection, of course. A sort of a prophesy of that, a sort of a type of that, a picture of that, a prefiguring of that, but I think what He says here is: I don’t have a choice about this because this is the standard of righteousness—to be baptized. It will continue to be the standard of righteousness—to be baptized, and since I am here, living as a man to fulfill all righteousness, I will be baptized. Of course, it doesn’t have the same exact meaning for Him, but He knows this is a call from God. He knows that John the Baptist is preaching God’s message—it is God, through John, calling people to be baptized and it is God through the apostles and God through the preachers, calling you to be baptized. Jesus is simply saying, "In order to fulfill all righteousness, I will be obedient to what God desires. If I’m going to live as a man, I’m going to obey all the commands."