Does it hurt?

Not really important because I’m single right now but I’m really curious. Does the first time having sex hurt? Does it just depend on the person? I’ve heard a lot of different things and the idea of sex makes me nervous, especially whenever my ex bought it up when we were together.