Each country has their own currency and generally won’t accept U.S. dollars. To avoid exchanging your money too many times, it's best to exchange directly from your home country's dollars directly to the currency of the destination you plan to visit.
For travel to some African countries, U.S. Dollars are more widely accepted, along with local currency.