Exchange rates are formed by supply and demand, just like the prices of most other commodities. The more demand there is for a given currency, the higher its exchange rate will be.
Typically, demand for a currency will occur for one of two reasons. First, people from other countries may want to buy goods from a given country. They have to buy that country's money in order to buy its goods.
Second, people fror foreign countries may want to invest in another country -- buy its stocks and bonds, for example. In this case too, they must buy that country's currency so they can use it to invest in the things they want.