An exchange is an institution which acts as a market-maker between parties who wish to buy and those who wish to sell. Exchanges facilitate trades between parties by displaying the bids of those who would like to buy an asset and the asks of those who would like to sell. If a buyer and a seller name the same bid and ask price respectively, the exchange will execute a trade between the two parties and collect a fee.
Almost all Bitcoin exchanges currently operate as custodians, meaning users deposit bitcoin at the exchange and withdraw it when they are done trading. During this time, the exchange maintains full control over the bitcoin, leading to security risks.