CPU Cooler
A CPU cooler is a computer component used to dissipate heat generated by a CPU under computation load. This is required as the cooler a CPU operates, the faster it will run. Running a CPU too hot can also cause irreversible damage to the component.
Air Coolers
The most common and cheapest type of CPU cooler are air coolers. In an air cooler, heat pipes contact with the top of the processor and dissipate heat via many fins attached to the pipes. Most air coolers have fans attached to them to blow hot air away from the fins, and those that do not are called passive coolers.
Some processors (e.g. Ryzen 3/5/7's, None-K Intel i3/i5/i7's) come shipped with an air cooler, referred generally as a stock cooler. Third party air coolers typically perform better then their stock equivalents.
AIO Water Coolers
All-in-one water coolers, aka closed loops. These are the water coolers most consumers would use, usually consisting of a CPU waterblock (which transfers heat from the CPU to the coolant within the loop) with an integrated pump and 2 pipes connecting the waterblock to the radiator, which dissipates heat in combination with the fans attached to it.
It is a common misconception that these result in lower temperatures than air coolers, as the best air coolers and the best water coolers are roughly on par temperature wise. To achieve very low temperatures with water cooling, one would need to opt for a custom water cooling loop as covered in the next section. The advantages of AIO water coolers over custom loop are drastically lower prices and not requiring any maintenance.
AIO water coolers have advantages over air coolers in some regards, such as having a more attractive (subjective) and less bulky form factor, although they tend to cost more.
Custom Water Cooling
The most efficient cooling systems which allow for significantly lower temperatures than air coolers and AIO water coolers, although the cost and maintenance required to set up and keep a custom water cooling loop running makes them prohibitive for those without disposable income or the time to maintain them. There are several important parts required to build a custom loop: Reservoir: not strictly necessary but having extra coolant in the loop does result in lower temperatures and the reservoir makes it easier to clean out the loop or add more coolant. Water blocks: these are what actually come into contact with components such as the CPU or graphics cards, and transfer heat from the chips into the coolant within the loop. Pipes: these connect the various parts of the loop. Radiators: these create large surface areas which in combination with fans blowing through them, dissipate heat from the loop. Fans: these direct air through the radiators, dissipating heat from the loop. Pump: this gets coolant flowing within the pump.
Thermal Paste
Allows for efficient transfer of heat from the CPU chip to the heatsink. It is best to apply thermal paste as a single small dot on the center of the chip, which will spread itself evenly across the top surface of the chip when the heatsink is installed on top.
FAQ
Should I buy a third party CPU cooler, or is the stock cooler good enough?
For most consumers the stock cooler is good enough, however if you wish to overclock your CPU you will almost certainly need a third party CPU cooler. Some Ryzen chips do come with decent stock coolers though, so this may not be necessary for those chips.
Should I get a third party air cooler or AIO water cooler? Air coolers and AIO water coolers achieve roughly the same temperatures, so the choice is between lower costs, better value (air coolers) and higher costs, better aesthetics (subjective), smaller form factors (AIO water coolers).
Are custom water cooling loops worth it? Not unless you are an enthusiast with disposable income and the time and knowledge to set one up. The temperatures are indeed lower (assuming you've set your's up correctly) than what you would get with an air cooler or AIO water cooler, but not low enough to justify their cost to most consumers. Unless your PC is already has a top end CPU, graphics card etc. it is usually best to spend your money on upgrading these components first.