The value of the pegged currency goes up and down depending on the exchange rate of the U.S. dollar.
Pegging a currency to the U.S. dollar gives that currency the same stability as the U.S. dollar, keeping its exchange rate from fluctuating too wildly.