Personally, I find it happens with my Apple Earbuds far more than any other pair I own.
You can read their explanation and hints for preventing shock below...
What is happening?
When using headphones in areas where the air is very dry, it is easy to build up static electricity and possible for your ear to receive a small electrostatic discharge from the headphones. Receiving a static shock from a pair of earbuds does not necessarily indicate an issue with the iPod, iPhone, or earbuds.
This condition is very similar to dragging your feet across a carpet and receiving a static shock by touching a door knob. However, instead of the static charge building up on your body, the charge builds up on the device that the earbuds are connected to. Likewise, instead of the static buildup discharging through your finger when you touch a door knob, it discharges through the earbuds.
Note: This condition is not limited to Apple hardware and static can potentially build up on almost any hardware and could be discharged using any brand of earbuds.
Why does static build up on my device?
- Static buildup on your electronic device is largely due to the environment that it is used in. Certain environments and actions can encourage static electricity buildup.
- Very low humidity (dry) environments are conducive for static buildup.
- Very windy environments are conducive for static buildup.
- Taking your device in and out of your pocket can create a static charge.
- Jogging or exercising with your device can cause a static charge.
- Clothes made with synthetic fibers (like nylon) can easily become charged with static electricity.
What else can be done to alleviate static build up on my device?
To minimize the risks of electrostatic discharge from the headphones, avoid using the headphones in extremely dry environments or touch a grounded unpainted metal object before inserting the headphones. Static electricity can be controlled by a number of different methods.
- Try raising the moisture level in the air of the local environment by using a portable humidifier or adjusting the humidity control on your air conditioner.
- There are a number of anti-static sprays that can be sprayed into the air that can be used to reduce static.
- If you have dry skin, try anti-static hand lotion.
Try wearing different clothes. Try clothes with natural fibers since synthetic fibers are more likely to hold a static charge.
- Try to keep your device out of the wind by using a case, or leaving it in your bag or pocket.
- Avoid removing your device from your pockets frequently as rubbing the device on certain materials can cause a static build up.