From the information you've given, it could indicate a mild form of a condition known as vaginismus - google it. Basically, the pain is caused by muscles in the vagina tightening, which prevents penetration, or at least makes it very difficult. It's a reflex action that your body takes and can't be helped, although it often has it's causes rooted psychologically. I know this because my current girlfriend of over a year suffers from it quite severely - she can't even use tampons. It seems her case is caused by a strict upbringing regarding sex, coupled with a belief that penetration will be painful (she's a virgin). Now, the condition appears to be entirely curable, but you'll have to do your own research since my girlfriend won't take the treatment for some reason. The primary thing for you is to try and not lose the intimacy in your relationship. This has happened for me and it's not pretty. I certainly didn't plan on spending my university years sleeping next to a girl who has no interest in any form of sexuality - especially as a I've only had sex once... Ever. Despite two separate long-term relationships...
If your relationship is very serious, then break it to your boyfriend slowly. Guys can get freaked out by the possibility of no sex for a long period of time, but if he cares for you, he'll try to understand. Like I say, intimacy is important and it would be vital to keep displaying affection to make the relationship function without feelings of guilt or rejection.
So yeah, that's my bit to add. It's a lot to deal with for a young person who expects sex to come naturally and to be a fun act, not an objective to conquer over time.
Perhaps I'm way off the mark here, but this is what I think it sounds like. If you decide to visit a doctor, mention the possibility of this relatively unheard-of condition before they refer you to some other kind of treatment for an STI or whatever.
I hope this helps!