Banks and exchange bureaus allow people to buy foreign currency before traveling, but they may not offer the best rates. It is best to get only a small amount of currency to cover expenses and exchange the rest of the money upon arrival at an ATM.
Though using an ATM to exchange money often gives the lowest rate, a backup plan, such as a credit card, may be necessary if things don't work out. For instance, if a person flies into a small foreign airport, there is no guarantee that there is an ATM. This is why having a small sum in foreign currency and a credit card is a smart idea until an ATM can be found.