sex problems

So my boyfriend and I had sex for the first time yesterday it has been almost a year since I had sex until yesterday. Before my boyfriend and I got together I had sex once in a year and a half. So basically I've had sex only twice in the past two and a half years. Well what I'm trying to find out is yesterday with my boyfriend it was very very difficult to have sex it was like I was a virgin all over again. he had to push quite a bit in order to get in and it hurt so so badly to where I was crying why is that? Is it because I havent had sex for so long or what? Because it really really hurt and he felt awful and this happens almost every time I have sex Unless I have sex quite often. And it's been like this since I've lost my virginity but it's never ever hurt this badly. Why could that be?