I think I didn't make it clear. I'm talking about actual US Dollars withdraw.
So was I. Let me try and make it clearer.
An exchange has a lovely platform. Two traders go on the website. Trader A deposits $1000 in
fiat money to the exchange, and the exchange credits this money to their account. Trader B deposits $1000 worth of
Bitcoin to the exchange.
Now, Person B decides to sell this $1000 in Bitcoin. At the same time, Trader A wants to buy $1000 in Bitcoin. So they click on a button on the exchange, and the exchange changes the numbers on the account - now Trader A has $1000 in Bitcoin and Trader B has $1000 in fiat money.
So the exchange is taking
absolutely no risk by providing this service. They had $1000 in fiat money and $1000 in Bitcoin - all they had to do was change who had the right to withdraw that money from their exchange.
This is absolutely clear.
In order to simplify a bit more:
An exchange is a website with a database and a connected UI. (really simplified).
Let's say this is a little exchange and it offers only USD and BTC to trade.
It means that the exchange has to have an USD checking account at any bank that offers account keeping in USD. Besides the USD bank account, the exchange needs to have at least a bitcoin wallet to store the bitcoins.
Users deposits their USD and BTC to the account and to the wallet. Exchange needs only a very good UI and a backend that manages the trades and updates the database. In the database the exchange stores the USD amounts per person based on the trade history, also the same stands for the BTC amount for the people. They have a large sum of USD on that checking account and if someone wants to withdraw, they just start a wire transfer. Also, if someone wants to withdraw bitcoin, they start a transaction on the blockchain from their wallet and send the bitcoins to the person's wallet.