To be saved you must turn away from sin, believe in the death and resurrection of Jesus, and receive Him as Lord and Saviour of your life.
Here is the step-by-step-process. First, you must consider your life and then turn away from everything in it that is contrary to what God wants. This turning away from selfishness and toward God is called repentance (see Matthew 3:7-10, Acts 3:19).
Second, you must acknowledge that Jesus Christ died on the cross to forgive you of sin. You take Him as your Saviour to cleanse you from sin–as the substitute who paid the price due you for your sin (see Romans 5:9-10, Titus 2:14).
And third, you must ask Him to be Lord of your life, acknowledging openly and verbally that Jesus is not only your Saviour but your Lord.
The Bible says that as many as received Him were given the power to become the sons of God (see John 1:12). So when you open your heart and receive Him, He comes into your heart, your inner person, through His Holy Spirit, and begins to live His life in you. From that point it is a question of confessing what God has done. “If you confess with your mouth the Lord Jesus and believe in your heart that God has raised Him from the dead, you will be saved” (Romans 10:9).