As others has suggested, the central bank has to set it as their target to keep a stable exchange rate.
Their primary tool is the interest rate. If interest rates are higher, people will want to invest in the country, to get a better return, which means they will buy UAE Dirham and sell dollars for example.
Secondarily, the central bank can trade the currency in the market. This is done for fine tuning the exchange rate, or to protect it under a lot of stress.