How do bitcoin exchanges work? I'm relatively new to the world of Bitcoins and understand the basic principles of wallets and addresses etc, but was wondering how exchanges (like Coinbase) work exactly.

Is the entire exchange basically one large wallet with each user having their own address? That would mean that an exchange would hold a wallet containing all their users Bitcoins, no?

When you buy Bitcoins from an exchange using a bank transfer or credit card, where are the Bitcoins you're buying sourced from? It was my understanding that you have to buy Bitcoins from an individual who's actively selling their Bitcoins. Do they just buy a massive amount of coins all at once and slowly sell them off?
First of all, Coinbase is a little different from the main concept of an "exchange".

Real exchanges, like MtGox or Bitstamp, are really just a medium between traders. People can set limit orders to buy / sell bitcoins for a certain price. The exchange will match buyers and sellers when conditions of both the buyer and the seller are met.

More concrete, there are two types of orders: limit orders and market orders. Limit orders allow a trader to buy bitcoins at a price lower than the current price or sell bitcoins higher than the current price. However, these orders will only be executed once another user accepts them. Market orders will just find the best matching limit order.

So, let's say the last trading price is 100 EUR/BTC. Two people want to sell bitcoins but not for 100 EUR. One sets a limit order for 105 and the other for 110. So the best price to buy bitcoins for is then 105. When a person places a buying market order, it will look for the best price and it will buy from the one trader for 105 EUR. If the buyer wants to buy more than just one bitcoin, he will continually take the lowest price available. Doing this, the "price" of bitcoin will increase as the lower-price sell orders are no longer available.

Coinbase is different because it, as far as I know, does not allow for limit orders. I'm not sure how they implement trading, but it's possible that they charge a little higher price and take the risk for themselves or they may just make your order at another real exchange they partner with. But in any case, if no limit orders are supported, it is not a real person-to-person exchange like most others are.