First off, try another set of headphones. If they do not exhibit this behavior it might be the headphones themselves. This is unlikely though.
It is not dangerous to you as a human, but it may not be great for the laptop or hard drive. Its probably not dire though. It means that the power filtering being done by the charger is not able to properly smooth out the sudden changes in power profile.
What is most likely happening is that when the compressor starts or stops it draws (or pushes back) significant amounts of electricity, which change the exact characteristics of the 50/60hz waveform, and present on the line as noise. This "noise" is obviously flowing through all the circuitry and landing up (in a diminished form, but free of the original 50/60hz waveform) in your speakers.
Depending on the age of your laptop, mobility of it and budget, it may be best to "do nothing", or plug it in to a different power point. From there the costs go up - getting a new laptop charger with better components, get an AC line / noise filter or a small ONLINE UPS (These have inverters which convert AC->DC and back to AC and will clean up the power).