Pain during sex?

So I haven't had sex many times, the other day I had it for maybe the 3rd time. It's painful but I understand it's because I'm new to it but when I was on top I got a bad pain in my lower stomach/abdomen. Does anyone know why this is?