A loan is an agreement made between the bank and the customer, where you take a certain amount with the promise to pay in the future, plus interest and, often, in pre-defined installments.
The stock exchange is a market, where people and companies relate through the purchase and sale of their bonds and shares. If you decide to sell a stock and another investor is interested in buying it, the exchange will be the meeting point between you.