Some currencies are "pegged" and if the government decides to devalue it it means they just decide to make up a lower value for exchange. For example, I lived in Brazil during a time when their Real was unrealistically pegged to the dollar. In reality the Real was worth about 30 cents. But the official rate was trying to stay close to 1:1. While they were moving away from a pegged currency to a floating currency they devalued their currency in order to get closer to the real market value.
In short, that is how currency devaluation works, their central bank just makes up a lower value. In floating exchange rates you can't just decide the worth (and currency depreciation is a better term than devaluation for these cases*) , so you need to attempt to influence the market and this usually involves some kind of coordinated buying and selling.
*
http://www.economist.com/research/Economics/alphabetic.cfm?LETTER=D#devaluation