How long does it take to get use to sex

Rachael
How many times does it take for sex to stop hurting in the beginning? 
I had sex last night for the first time and it hurt so badly in the beginning but got better. Is it going to be like that every time ?