Boyfriend in pain during sex?

My boyfriend and I had sex for the first time yesterday, and he said it hurt. Why is this happening!?