First and second-generation AirPods are not sweat or water-resistant.
Third-generation AirPods are sweat and water-resistant, not waterproof. They’re not built to withstand water sports such as swimming nor high moisture conditions such as showering.