Of course! Apple EarPods with 3.5 mm Headphone Plug will work seamlessly with iPhone, iPad, and iPod models that have a corresponding headphone jack.
Non-Apple products that have a standard 3.5 mm headphone jack will also recognize them.
If you would like to use Apple EarPods with Lightning Connector, make sure you have a device that runs iOS 10 or later and has a Lightning connector.
It's also worth to mention that Apple EarPods with Lightning Connector do not work with iPod nano or any device that has iOS 9 or earlier.