Becoming a Christian

Hi, I'm just reaching out in hopes that someone will tell me how to become a Christian. Growing up occasionally I heard preaching where you just have to ask God to come into your heart and you'll be saved. Is that it? What if I have done bad things after that? Thanks for any help you can provide.