The classic passage from the Bible that answers this question is John 3:1-21. The Lord Jesus Christ is talking to Nicodemus, a prominent Pharisee and member of the Sanhedrin (the ruling body of the Jews). Nicodemus had come to Jesus at night with some questions.
As Jesus talked with Nicodemus, He said, “‘I tell you the truth, no one can see the kingdom of God unless he is born again.’ ‘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!’ Jesus answered, ‘I tell you the truth, no one can enter the kingdom of God unless he is born of water and the Spirit. Flesh gives birth to flesh, but the Spirit gives birth to spirit. You should not be surprised at my saying, “You must be born again”’” (John 3:3-7).
The phrase “born again” literally means “born from above.” Nicodemus had a real need. He needed a change of his heart—a spiritual transformation. New birth, being born again, is an act of God whereby eternal life is imparted to the person who believes (2 Corinthians 5:17; Titus 3:5; 1 Peter 1:3; 1 John 2:29; 3:9; 4:7; 5:1-4, 18). John 1:12, 13 indicates that being “born again” also carries the idea of “becoming children of God” through trust in the name of Jesus Christ.
The question logically comes, “Why does a person need to be born again?” The apostle Paul in Ephesians 2:1 says, “And you He made alive, who were dead in trespasses and sins” (NKJV). To the Romans he wrote, “For all have sinned and fall short of the glory of God” (Romans 3:23). Sinners are spiritually “dead”; when they receive spiritual life through faith in Christ, the Bible likens it to a rebirth. Only those who are born again have their sins forgiven and have a relationship with God.
How does that come to be? Ephesians 2:8-9 states, “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.” When one is saved, he/she has been born again, spiritually renewed, and is now a child of God by right of new birth. Trusting in Jesus Christ, the One who paid the penalty of sin when He died on the cross, is the means to be “born again.” “Therefore, if anyone is in Christ, he is a new creation: the old has gone, the new has come!” (2 Corinthians 5:17).
If you have never trusted in the Lord Jesus Christ as your Savior, will you consider the prompting of the Holy Spirit as He speaks to your heart? You need to be born again. Will you pray the prayer of repentance and become a new creation in Christ today? “Yet to all who received him, to those who believed in his name, he gave the right to become children of God— children born not of natural descent, nor of human decision or a husband’s will, but born of God” (John 1:12-13).
If you want to accept Jesus Christ as your Savior and be born again, here is a sample prayer. Remember, saying this prayer or any other prayer will not save you. It is only trusting in Christ that can save you from sin. This prayer is simply a way to express to God your faith in Him and thank Him for providing for your salvation. “God, I know that I have sinned against you and am deserving of punishment. But Jesus Christ took the punishment that I deserve so that through faith in Him I could be forgiven. I place my trust in You for salvation. Thank You for Your wonderful grace and forgiveness—the gift of eternal life! Amen!”
Material from – https://www.gotquestions.org