Painful sex

Sex with my boyfriend never used to hurt, not even my first time and yesterday and a few weeks before that it has really hurt to the point we've had to stop, i don't understand why it suddenly hurts? Any help would be greatly appreciated