sex help!

me and my boyfriend tried to have sex but it hurt me so bad either we werent doing it right or idk. it was my first time was it suppose to hurt that bad? any advice?