First time breastfeeding

How can I get it to hurt less? I haven't done it yet, my friend just had her daughter and I'm about to have mine and I'm scared that I won't get her to latch properly and it will hurt but I know that it's not supposed to. Also, How do I take care of my nipples when they're all messed up?