Googling, you'll find a number of explanations, but, more often than not, offers to help, for gurgling pipes. Of the many explanations, here is one that is prevalent in my house.
In my house, there are no leaks, I didn't notice anything wrong about the drain plumbing (soil stack, roof-air vents, P-traps, loops, etc.) before I finished closing up the walls in the basement (my house was brand new and "unfinished" downstairs). And, there have never been leaks.
So, when I hear big gurgling noises, which I often do in two locations, the laundry room underneath the washer and in the general or "public" bathroom upstairs which gets little use because we're empty nesters, it's alway as a result of Utah's dry climate evaporating and emptying the P-traps of little-used drains.
Why the laundry? Because when we bought the house, I plumbed in a floor drain to take care of any washer spills.
The one in the bathroom is easy. I just run the tub for a few seconds, which, unless we get guests, is never used. This fills its P-trap and voilà no more gurgle.
Ditto for the laundry room floor. I get a pitcher of water and pour it down the floor drain which replentishes the P-trap. More frequently than hearing gurgling, however, the laundry room will begin to stink because the P-trap has gone dry no longer sealing drain odors out of getting into the room.—time to refill then too.
Find a hole saw very close (though not always identical) to the internal diameter of the pipe glued into the fitting you wish to release it from.
This will almost certainly not work for ABS. Also, you will want to do this in a well ventilated room.
An alternative to the above would be to use a "dagger" hacksaw to cut the tubing into segments carefully to avoid cutting into the fittings glued surface, then using pliers to tear out the segments. This is frustrating and tedious.
A last method is very expensive. Purchase a cutter to mount on your drill (north of $60) that just fits inside the fitting and cuts (mills out) the tubing. Then reprime and reglue.
Unlike air, water cannot be compressed. This fact makes it so that when water flow is shut off abruptly by an appliance, such as a washing machine, dishwasher, toilet or refrigerator ice-maker and water dispenser, the inertia of the flow hits the new obstruction (valve) and, having nowhere to go as well as not being compressable, it slams back against the water behind it. This is called "water hammer."
Slower action valves such as bathroom vanities, kitchen sinks, showers and tubs can reveal water hammer if they are used abruptly. Typically, these are turned a bit slower which reduces or eliminates water hammer.
Water hammering in your pipes will make vibrations in the walls where the pipes run sounding like anything from a light hum to someone running a jackhammer. This isn't a harmless phenomenon for it can loosen or break connections and fittings resulting in leaks.
The best solution is usually to install special devices, called arrestors, that separate off an air bubble inside pipes near appliance fittings. Unlike water, air can compress. Arrestors are built moreover with the ability to separate the air from the water's natural tendency to absorb the air into itself. In the old days of plumbing, plumbers installed funny little "pigtail dead-end" bits of pipe near valves to accomplish this, but the whole system had to be frequently drained and filled with air in order to replace the missing air after it dissolved into the water.
If you hear hammering when your toilet stops filling after a flush, installing an arrestor under your kitchen sink will not change anything. If you install it as close to the offending valve as possible, it will likely solve your problem.
Older washing machines suffered from this problem too, but...
...new, water-saver washing machines create worse problems still. When they start up, they fine-control the washer's behavior by turning the water on and off repeatedly. 15-20 times per load of wash has been observed on some washers. This puts a lot of stress and strain on the plumbing.
Note that even older machines created potential water hammer every time they did the initial fill, did the rinse fill, and spray-rinced the clothes during the spin cycle. New-fangled machines just do a lot more of this.
In the case of arrestor for washing machines, they are very easily installed since you unscrew the hose connections from the wall, connect them to the new arrestor, then connect the arrestor to the back of the washing machine.
Other water-hammer arrestors range from challenging to easy to install. Each situation calles for what's usually sold as a special purpose water-hammer arrestor.
This involves shutting off water to the toilet, unscrewing the water line to it, mounting (the black-plastic connector of) the arrestor to (the bottom of) the toilet flush water inlet, then connecting the water line to (the other fitting on) the new arrestor.
Shut off the water, cut the plastic or copper water line, install the new arrestor using its compression fittings. Do this as near to the refrigerator as is practical.