Painful Sex

I've had sex twice now and each time it was extremely painful. My Bestfriend told me that she didn't experience good sex until the 5th time. But I don't want to continue going through that pain. Can you give me any advice that will help me experience pleasure while having sex and not just pain?