The iPhone X is rated IP67 under IEC standard 60529. The first number in the rating (6) represents the degree of protection from dust. This rating ranges from 0 to 6. The second number (7) represents the degree of protection from moisture. The protection levels for this rating range from 0 to 8. This means the iPhone X has the highest level of protection from dust and the second-highest from moisture.
iPhone X owners can submerge their device in water of up to 1 meter (or 3.3 feet) for up to 30 mins. Remember, liquid damage is not covered under Apple's warranty. This means you should avoid taking your iPhone in the shower, swimming or with you during any water sports. It is however safe to take it out in the rain, and it should be safe from accidental spills or drops in water.
Here is the fineprint from apple.com:"iPhone X is splash, water, and dust resistant and was tested under controlled laboratory conditions with a rating of IP67 under IEC standard 60529. 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."