Depends on the Chemical
When doing a pool shock (superchlorinating the pool with concentrated chlorine), you should wait between eight and 36 hours before swimming in your pool. When adding less-caustic chemicals like calcium chloride, sodium bicarbonate and muriatic acid, wait for the pool to turn over, or completely run all the water through its filtration system. Two hours should be sufficient.
Different Pools, Different Wait Times
Because different pools have different amounts of water and different filtration systems, your wait times will vary. When doing a pool shock, always measure the chlorine parts-per-million (ppm) level. You will be shooting for a number between 1.5 and 3.5 ppm. When adding other chemicals, consult with the pool-filtration system manufacturer to see how long one complete pool turn-over will take.
It is always better to err on the side of caution when calculating pool wait times to avoid health concerns for those swimming your pool. Make sure you plan ahead of time, taking care to add chemicals with enough of a window before you plan to use your pool. It is better to wait too long than not long enough.