Revelation 3:20
ESV - 20 Behold, I stand at the door and knock. If anyone hears my voice and opens the door, I will come in to him and eat with him, and he with me.
For follow-up discussion and general commentary on the topic. Comments are sorted chronologically.
Good question! First of all, you must tell Jesus that you're a sinner, confess/repent of all thy sins, and invite him in you heart. Plus he'll not only forgive, but will forget as well: "...never to remember those sins anymore, ever".