If I have a balance in USD with any exchange, and I placed an order to buy bitcoins, how does it work for the exchange? do they need to hold enough bitcoins to cover all the "buy" transactions and sell those bitcoins to me from their wallet? or, they will find someone on their platform who wants to sell that amount at that price and withdraw his bitcoins to my bitcoins?
Traditional Bitcoin exchanges hold their customers' funds, both Bitcoins and counter-currencies. So when a trade is actually made, the exchange just adjusts their own balance numbers. Prior to being able to buy Bitcoins, you must deposit some other currency into your account at the exchange. Prior to being able to sell Bitcoins, you must deposit Bitcoins into your account at the exchange.