Advice please

When im in the mood of having sex me and my boyfriend try to do it but it hurts so my much while going in. Why is that ? We foreplay before we try to have sex.