While the basic function of an air purifier is to get rid of airborne contaminants, a dehumidifier, as the name suggests, eliminates excess humidity from the room.
A dehumidifier takes in humid air from the room, removes the moisture and releases dry air. The collected moisture goes into a collection tank that you need to empty and clean regularly.
Ideally, your room should have a humidity level below 50%. In order to maintain that, you need a dehumidifier.
Dehumidifiers can be one of two kinds depending on how they function. One functions using refrigeration, in which the unit cools the air to get rid of the excess moisture, then warms it up again and releases it back.
Other units work on the basis of adsorption/absorption. In the former, moisture sticks to a material in the unit, which you then take out. Meanwhile, in the latter, a material absorbs all the moisture in the air to remove it.
If you often find mold around the house or see condensation on your windows, chances are the air around you is too humid. Apart from being a breeding ground for mold, high moisture also attracts dust mites.
So, lowering the humidity with the help of a dehumidifier reduces the chances of mold and dust mites thriving.
Low humidity also helps you relax since high moisture makes you warm and uncomfortable.