The iPhone 7 and iPhone 7 Plus from Apple feature an IP67 certification which means that they are dust and water resistant. The IP67 rating means that there can be no dust ingress on the new iPhones, and that they can easily survive being submerged in water for up to 30mins in 1m depth.
Apple notes that the phones are splash, water, and dust resistant, but they should not be permanently or continuously used in such situations. This is because their water resistance will decrease over time due to normal wear and tear. Additionally, the Cupertino company notes that one should not try charging a wet iPhone as it can damage the iPhone. On iOS 10, a warning will automatically pop up when a wet iPhone is being charged and moisture is detected in the Lightning port.
iPhone 7 and iPhone 7 Plus are splash, water, and dust resistant and were 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.
Most importantly perhaps, despite the IP67 rating, Apple will not be covering liquid damage of iPhone 7 and iPhone 7 Plus under warranty. This should not be surprising since many other OEMs like Samsung and Sony also do the same. This is because the phones are water resistant to a certain amount of pressure, and if this pressure level is exceeded, the water resistance seal in the phones can fail thereby leading to water or moisture seepage.
Also, water and salt water are very different. Do not dunk your iPhone in sea water or use it underwater in a sea as it can potentially damage the phone.[Via MacRumors]