Is it just through the headphones only or through all audio devices? If just the headphones id try another pair. If all devices, look at the audio cable from the computer to where everything plugs into.
To me, this sound like there is a problem between the audio out port and the speaker. Some cases the static comes from a dirty pot on the volume knob. Bumping or moving it causes static. Or maybe extreme case the port on the computer has an intermittent contact or bad solder joint. If it were happening to me, I would be focusing my effort into the audio out side of things. If you can find one cheap, look for a USB audio out device and try that temporarily with a speaker or a different set of headphones. If it goes away completely, then that will narrow the problem from the audio out port and your current set of headphones. Only times I have had the issue with a ground loop would be a constant hum in the background, not static.