Sex related question

Is sex painful? I’ve never done it before and some people say it’ll hurt the first time?