Contractions and going to hospital

FTM, when did you know when to go to the hospital when you’re having contractions? Is it based on the frequency and intensity ?