It’s not like an Apple watch that you can wearing it and do water sports, like swimming, snorkeling, surfing, or taking part in other types of water activities. The iPhone models are not waterproof, they are however water resistant (to a degree).
With an IP rating of IP68, Apple designed the iPhone XS to be waterproof in situations where it’s submerged no deeper than 2 meters or about 6 feet in water for 30 minutes or less.
The iPhone XR and the original X are rated IP67 under IEC standard 60529 much like the iPhone 8 and iPhone 8 plus models when it comes to water resistance.
Examining the tech specs for these iPhone models, you find a small footnote that calls out the details of this.
As per Apple’s disclaimer via the footnote on the new iPhone XS Technical Specifications page:
iPhone XS and iPhone XS Max are splash, water, and dust resistant and were tested under controlled laboratory conditions with a rating of IP68 under IEC standard 60529 (maximum depth of 2 meters up to 30 minutes). Splash, water, and dust resistance are not permanent conditions and resistance might decrease as a result of normal wear. Do not attempt to charge a wet iPhone; refer to the user guide for cleaning and drying instructions. Liquid damage not covered under warranty.
This means that your iPhone XS or iPhone XR/X/8 will not get damaged if it is exposed to a little rain splash while you are on the run.
Likewise, if you accidentally dropped it in the toilet or splashed some beer on it, you will be ok. Your iPhone will not be permanently damaged.
Remember Apple iPhones are Water-Resistant but not Waterproof!!