This is the most important question anyone can ask - it's truly a matter of eternal life and eternal death. Jesus answered this question with a story found in Luke 18:10-13:
Two men went up to the temple to pray, one a Pharisee [a religious leader] and the other a tax collector [a traitor of the Jewish nation]. The Pharisee stood by himself and prayed: "God, I thank you that I am not like other people - robbers, evildoers, adulterers - or even like this tax collector. I fast twice a week and give a tenth of all I get." But the tax collector stood at a distance. He would not even look up to heaven, but beat his breast and said, "God, have mercy on me, a sinner." I tell you that this man, rather than the other, went home justified before God.
This short story identifies the only two types of people: those who think they are good enough to be right with God (like the Pharisee) and those who know that they can't be good enough (like the tax collector). Jesus says the one who recognized he was a sinner and called to God for mercy became right with God (justified).
God can extend mercy to guilty sinners (and we all have sinned) because Jesus, God in the flesh, died in the place of sinners, was buried, and rose again. You must ask God for mercy, trusting in Jesus and turning from your sin. Once you do this, you'll become a new person who now desires to do God's will. You can find God's will by reading the Bible and praying to God for insight!
Additional References: Romans 3:21-26, 5:6-11, 6:23, 10:9-13; II Corinthians 5:17-21