Painful

I tried having sex with my bf, its very painful.. Am i doing it wrong?