dessicants are compounds that have a high affinity of water molecules. The principal of dessicants depends on differnet types.
For example, anhydrous salts (like anhydrous CaCl2, MgSO4 act as dessicants by combining with water to form hydrated salt.
Other chemicals, like CaO (the 抽濕 big elephant u use in ur wardrobe) dessicate by reacting with water:
CaO + H2O ==> Ca(OH)2.
there are other dessicants available, like silica gel, molecular sieves, etc.