That's a very good question, particularly since you may have been experiencing "false" contractions, known as Braxton Hicks contractions, for weeks. To tell if it's the "real" thing, time the contractions (which feel like strong menstrual cramps in the beginning) from the start of the one to the start of the next. If they come consistently, with about the same amount of time in between and become progressively closer and stronger, you're in labor. Other signs that labor is potentially imminent include:
Loss of your mucus plug. This is the thick plug of mucus that seals off the cervical opening from bacteria. As the cervix thins and shortens, the plug falls out. With this could come the "bloody show" where you'll likely notice some blood on your toilet paper.
Trickling or gushing of amniotic fluid. If you think you just wet your pants, but the liquid is odorless, your water just broke. If you do notice a color or odor, call your health care provider immediately, as it could be a sign the baby is in distress and has passed merconium in the uterus.
If any of these signs of labor occur, call your health care professional to discuss at what point to come into the hospital.