Pain with Sex

I am 18 and just lost my virginity to my boyfriend and we have had sex close to 8 times, but everytime he sticks it in it hurts, after he fully gets it in and starts going it doesn't hurt anymore. I was just wondering why this is and if there is anything I can do to prevent the pain?