If you or your baby show any signs of distress, you will be delivered immediately. Otherwise, you will usually remain in the hospital under observation until you go into labor on your own or you are induced or scheduled for a C-section (usually around 34 weeks gestation).
Known as PPROM, or preterm premature rupture of membranes, this is when the bag of water breaks before labor has started and your baby is less than 37 weeks along. If immediate delivery is not needed, most women with PPROM will remain in the hospital until they either go into labor on their own or they are induced or scheduled for a C-section. Usually, the goal is to reach 34 weeks' gestation, at which point delivery is often recommended since the risk of infection and other complications is higher than the benefit of staying pregnant longer.
During this time, a few different things are done to optimize the length of the pregnancy and the health of the baby. This usually includes a course of antibiotics to prolong the pregnancy, steroid injections to help mature the baby’s lungs and blood vessels in the brain and the gastrointestinal tract, and possibly medication to stop contractions (though this is not always done as the data is somewhat controversial).