What happens when a currency is devalued?
The devaluation of currency can only happen when a nation has been keeping its currency at a fixed exchange rate. For example, if Mexico keeps its peso at, for example, 15 pesos to the dollar, that is a fixed exchange rate. In such a case, a government can devalue its currency by changing the rate and making its money worth less. In this example, the Mexican government could change the exchange rate and say that the peso is now worth less -- 30 pesos to the dollar.
One major impact of such a move is that the country's exports become cheaper for people in other countries to buy. This is often seen as a reason to devalue -- to allow your country's exporters to sell more goods abroad.
There are many other impacts, though, and not all of them are good. For example, devaluation can result in a huge loss of confidence among the citizens of the country that devalues its currency. Please follow the link for a thorough discussion of various impacts of devaluation.
Assume two nations which have currencies X and Y. If X is devalued with respect to Y, it means that more of X can be obtained for the same value of Y. This makes products that are imported by the Nation with the currency Y from the Nation with the currency X cheaper and vice versa. Similarly the products that the Nation with the currency Y exports to the Nation with the currency X become costlier and vice versa.
By devaluing its currency a country can increase exports and decrease imports. An example of this is China which has devalued its currency a lot with respect to the US dollar and by doing so has increased its exports to the US while decreasing its imports from the US.