Just about every kind of insulation has some kind of sound-reducing effect. Fiberglass, mineral wool, blown in cellulose or natural fibers, spray foam, and foam board all reduce sound to some extent. To understand why this is so it's important to understand how sound travels in the first place. The phenomenon we know as sound is the compression and rarefaction of a series of air waves. These waves are created when an object moves within air. They are either absorbed or reflected. When sound is reflected it there is more energy transferred through the air leading to more sound. Hard and smooth surfaces are the best at reflecting sound since there is little space of for the sound to be absorbed. Soft materials with lots of air in them are in contrast good at absorbing sound waves. Besides materials, there are also insulation types specifically made to reduce sound. These kinds of sound insulation is thicker and denser than regular insulation, and they are optimized to reduce sound rather than control temperature like thermal insulation.
One important point to consider when thinking about adding insulation to reduce noise in a building is the difference between soundproofing and sound deadening. Sound proofing means making a space that sound cannot penetrate, while sound deadening is simply reducing the transmission of sound in a space. Which of these goals to pursue depends on the specific sound situation in a space. Noise from an airport or train yard, will require a different solution than say noise from neighbors or street noise.
Fiberglass insulation is a good sound proofing insulation due to its fluffy dense texture. It has the advantage of being affordable and easy to install. The key to having fiberglass insulation perform it's best for sound proofing is to make sure the insulation is thick enough and is in the right spaces. It should be installed behind all interior walls to the proper thickness. In a lot of cases the reason that insulation does not work as well as it should including for thermal and sound proofing purposes, is that it is not as thick as it should be.
Another insulation option for sound reduction is open cell spray foam. This kind of insulation can be injected behind drywall without removing the drywall at all. Foam insulation works by expanding to fill the space it is installed in. This stops air flow and absorbs the energy of the sound waves encountering it. Holes can be drilled into the drywall and the insulation pumped in. It can also be don from the outside by removing siding and drilling into the stud void. It can also be installed in ceilings and attics Foam insulation can reduce the sound entering a building as much as 80% And of course spray foam insulation has the dual advantage of keeping a space a comfortable temperature.
Besides increasing the amount of insulation, there are several other way to reduce sound in a space like extra drywall or special kinds of drywall layered with ceramics and polymers, sound reducing caulk, weather stripping, acoustic panels, and replacing hollow doors with solid ones.