Simply put IPX4, is resistant against water splashes from any direction. Note that it just splashes and not a continuous stream of water!
Let's dive in deeper!
Nowadays, you see many Headphone Manufacturers advertising their products as "dust resistant", "sweat resistant" or "splash resistant".
To add more credibility to their claims, they specify "IP Codes" stating their Water Resistance Rating.
IP stands for "Ingress Protection". It measures how well a device is protected against both solid objects and liquids.
An IP rating may look something like this IPX4, IPX5, IPX7... and so on.
IP ratings are only given to a product that undergoes special testing by a certified, independent company.
So no company can just use their own IP rating on any product, just because they feel like it's worth it.
(Thank God for that. That would have made things really messy)
Even though the manufacturers tend to highlight that their product is "Waterproof", you shouldn't be fooled.
As far as IPX4 Waterproof rating is concerned, it protects your device from accidental water splashes only.
So you shouldn't do a test by submerging the device into water or putting it through running water.
You're bound to lose your device for sure in that case :)
If you would like to read more about IP Ratings, check out this article about IP Code on Wikipedia.
Or if you're into learning things in entertaining ways, check out this video.