Any transfer of financial instruments, such as stocks, in the primary or secondary markets involves 3 processes:
Execution is the transaction whereby the seller agrees to sell, and the buyer agrees to buy a security in a legally enforceable transaction. All processes leading to settlement is called clearing, such as recording the transaction. Settlement is the actual exchange of money, or some other value, for the securities.
Clearing is the process of updating the accounts of the trading parties and arranging for the transfer of money and securities. Only members may directly use the services of the clearinghouse; retail customers and other brokerages gain access by having accounts with member firms. The member firms have financial responsibility to the clearinghouse for the transactions cleared. It is the responsibility of the member firms to ensure that the securities are available for transfer and that sufficient margin is posted or payments are made by the customers of the firms; otherwise, the member firms must cover any shortfalls.
For transferable securities, the clearinghouse aggregates the trades from each of its members and nets out the transactions for the trading day. At the end of the trading day, only net payments and securities are exchanged between the members of the clearinghouse. Additionally, the clearinghouse records all transactions by its members, providing useful statistics, as well as allowing regulatory oversight of the transactions.
Settlement is the actual exchange of money and securities between the parties of a trade on the settlement date after agreeing earlier on the trade. Most settlement of securities trading nowadays is done electronically. Stock trades are settled in 3 business days (T+3), while government bonds are in T+2.