Prairie/Masker is a set of defensive ASW systems originally developed by the United States Navy for use on warships. It is intended to reduce the acoustic signature of a ship by managing the propagation of sound waves from the ship into the surrounding water. It consists of two main components, originally code-named PRAIRIE and MASKER.

The MASKER system reduces the amount of noise that escapes from a ship's hull into the water. This has the effect of making the ship more difficult to detect on passive sonar/hydrophones. Two more more bands of tiny nozzles are mounted around the hull below the waterline. When the system is active, air is forced out of these nozzles, forming tiny bubbles which are generally trapped into flowing around the hull. When sound waves change medium, large differences in the speed of sound in the two media will cause much of the sound to reflect instead of transiting the interface. The speed of sound in air is approximately one fifth of the speed of sound in bubble-free seawater (331 m/s at STP vs. approx 1560 m/s). The speed of sound in seawater filled with bubbles is actually even slower than the speed of sound in air, and thus the difference between the speed of sound in the MASKER region around the hull is much, much slower than the speed of sound in the water surrounding it.

As a result, sound waves from the ship (machine noises, human noises, all the signature sounds that passive sonar relies on detecting) are in fact reflected (or at least, a large portion of them are) back into the hull, where they are eventually absorbed and turn into heat, rather than traveling out into open water. The sound that does escape is predominantly the chaotic noise of the MASKER system itself operating - a white noise that sounds (reportedly) like a very quiet version of rain on the surface of the ocean - something that is difficult to identify as a sonar target, and difficult to pinpoint directionally.

The PRAIRIE system deals with a different problem - that of cavitation. Since propellers in motion in the water create low-pressure voids behind their blades which collapse, creating high-frequency noise, PRAIRIE was invented to address this issue. Air bubbles are released near the screw itself. The presence of the air means that the low-pressure voids behind the blades cannot fully collapse in a water-on-water impact, since there is air in the way - thus, the sound of cavitation is muffled. Also, what sounds are created are interfered with in a manner similar to that of MASKER.

Generally, these systems are not options for submerged submarines, as they require a constant flow of high-pressure air to function. Surface ships, especially those driven by turbines as most modern warships are, can simply intake ambient air and pressurize it for use in these systems. On a submerged submarine, air is a precious commodity and cannot be spent in this fashion. Submarines rely on more passive means of quieting, such as noise management tactics and anechoic coatings and machinery rafts. In addition, maintenance of the system can be problematic as keeping small submerged nozzles clear is non-trivial. One means of preventing sea life from clogging the system is to allow a tiny amount of fresh water to flow through the nozzles when they are not in use (the pressure of the ejected air keeps them clear while active). This inhibits the growth of most standard ship-fouling microorganisms.

PRAIRIE/MASKER was originally a classified U.S. Navy system, installed on ship classes such as FFG-7, DDG-963, DDG-51 and CG-47. It has migrated to the open press - probably its most famous early appearance was in Tom Clancy's books - and now is available from warship constructors in various nations.

Sources:

Jane's Underwater Warfare Systems(redacted paywall link)
Principles of Naval Weapon Systems, Craig M. Payne, U.S. Naval Institute Press, pp 173-175
Federation of American Scientists Military ship systems