you could also be verry tight. i have been haveing sex for almost a year and if i dont have sex for a week or more i will tighten back up and it will hurt agen. i have had friend say it takes a while for them to stop hurting every one is diffrent. but depending on the servirty of the pain or if it hurts a while after, see a doctor. use some lube, if using condomes get lubecrated, and foreplay.
Make sure you are nice and relaxed before sex, maybe some foreplay to help with lubrication, or try using a synthetic lubricant.
if that still hurts then speak to a doctor as it shouldnt hurt. they will have a look and should be able to help from there.
Hope you get sorted x