Let us begin with John 3:16...
For God so loved the world that He gave His only Son, that whoever believes in Him should not perish but have eternal life. [John 3:16, RSV]
This verse is a concise yet beautiful statement of the Gospel message. God so loves us that He sent His only Son, Jesus Christ, to die on the Cross at the hands of sinful men in order to save us from hell (Romans 5:6-11). Our salvation is a free gift from God purchased by Christ. We cannot earn heaven least we boast (Ephesians 2:8). We are saved through Christ by believing in Christ. But what is "believing?"
Now John 3:16 is not a complete expression of the doctrine of salvation. We must understand it in the context and fullness of revelation. Only twenty verses later, it is also written:
He who believes (pisteuon) in the Son has eternal life; he who does not obey (apeithon) the Son shall not see life, but the wrath of God rests upon him. [John 3:36]
The RSV, NAB and NASB Bibles translate the Greek verb, apeithon, as "obey." This verse connects "belief in Christ" with "obedience to Christ." Elsewhere St. Paul connects faith with obedience as in "the obedience of faith" [Romans 1:5] and with good works as in "faith working through love" [Galatians 5:6]. Also it is written, "By faith Abraham obeyed..." [Hebrew 11:8]. According to the Bible, "to believe" also means "to obey." We do not sincerely believe in Christ, if we disobey God's Commandments - i.e. commit sin (James 2:18-26). Sin is a break in faith (Numbers 5:6-7).
As a result of Adam's sin (Romans 5:12) and through our serious sins, we reject God and deserve hell - the loss of eternal life. It must be remembered that hell is not punishment from a vengeful God but the natural consequence of rejecting God - the Source of life and goodness. Our sins offend God's love. There is nothing we can do as finite (limited) creatures to repair this infinite (unlimited) offense. Fortunately due to God's mercy, Christ redeems us from hell through His Passion and Sacrifice on the Cross. As a free gift (Titus 3:5), God forgives us and offers us the grace to live with Him in friendship forever, beginning in the Sacrament of Baptism (Mark 16:16; 1 Peter 3:21; Acts 2:38). In the washing of Baptism, we receive Sanctifying Grace, which makes us right with God (Acts 22:16; 1 Cor 6:9-11).
Now we are surely redeemed by Christ in Baptism but we can freely choose to reject this gift through serious sin. As St. Paul writes:
For the wages of sin is death, but the free gift of God is eternal life in Christ Jesus our Lord. [Romans 6:23]