Sterilization of liquidity?

As I understand the definition of sterilized liquidity it means that the central bank is adding liquidity which have no effect on inflation or interest rate. But how do they do this and for what reason?

Central banks try to balance between two impossible things. Typically, CB will for example, try to weaken domestic currency (to prop up exports), but does not want inflation to be noticed. So they buy foreign currency (that adds liquidity) and later remove that liquidity by selling bonds. Go figure.