Buying foreign currency is dependent on the purpose of visiting that country. You can go for a business trip, a medical trip for high end treatment, for studies, for touring etc. Before buying foreign currency you should have the permission granted from the primary or the central bank of the country you are presently residing (for specific purposes). The person concerned should apply for exchange and can buy the currency by paying the same amount in his own currency to the concerned dealer or the bank.There are different levels of exchange which depends on the purpose of going abroad. The limits of buying foreign currency are defined as per the rules set by the government of that particular country in which you reside. For example you will not buy the same amount of foreign currency for a holiday trip and anintensive medical treatment.
The foreign currency is exchanged on the basis of the currency rate on that day. Buying foreign currency is dependent on the exchange rate, as more the exchange rate less is the amount of foreign currency you get for the same amount of money. It is also dependent on difference of the value of the foreign currency with the currency of your country.