We often hear customers having issues with 3.5mm stereo jacks where there is occasional and sometimes constant static. Typically the issue is dust between the contacts of the headset jack and the port you're plugging into. If you occasionally touch the metal contact with your fingers, you are putting oils on the connector. This in turn allows dust to easily adhere and accumulate on the metal contact. Dust gets between the points of contact and causes static.
How to fix headset static?
First, remove the headset jack from the plug in. With a can of compressed air, spray into the connector to hopefully remove any dust. If you don't have compressed air, you can blow into the connector with short, powerful puffs of air.
With a soft cloth, thoroughly wipe the metal contact to remove any dust and oil residue.
When finished, re-insert the jack into the connector. Hopefully this resolves the issue and you can use your headset without static.
If it doesn't, the 3.5mm jack may be damaged and not lining up correctly which causes static as it occasionally makes contact. Your headset will need to be replaced at that point.
Another cause of static with headsets using the 3.5mm connection is when wires become damaged inside the outer protective cable. This can happen if you regularly pull or tug on the cable (colored orange in the above pictures) instead of the hard plastic molded assembly. It's best to separate the cables only by pulling the hard molded plastic next to the 3.5mm jack while also holding the inline volume controls with your other hand.
In September 2016, Apple release the iPhone 7 and for the first time, removed the 3.5mm headset jack. This was a much needed move in the industry to replace the 3.5mm headset jack with a more durable and reliable connection. For Apple, it meant moving to their Lightning Connector. Other mobile phone and device manufacturers surely will follow Apple's lead.