Powered by the all-new Apple H1 headphone chip, AirPods use optical sensors and motion accelerometers to detect when they’re in your ears. Whether you’re using both AirPods or just one, the H1 chip automatically routes the audio and engages the microphone.
https://www.apple.com/shop/product/MV7N2AM/A/airpods-with-charging-case