A clearing corporation is a company that facilitates trades in the markets by matching up the sell orders with the buy orders, somewhat akin to an escrow agent in real estate. The ancillary elements that can make trades complex, such as margin accounts, CUSIP vs. ISIN ID codes, and open vs. covered positions to calculate counterparty liability...can be a challenge. The clearing corporation usually has sizeable cash behind it to serve as a middleman in the trade, by putting up its own cash or credit to facilitate each trade for a fee.
Clearing also occurs on several levels, due to complexity and asset class. Futures, options, bonds, and stocks all have different criteria for satisfying good delivery.
For example, Depository Trust Company handles trillions of dollars in corporate and municipal securities every day on a custodial basis. Firms that are self-clearing, such as Morgan Stanley, BNY Mellon, and Knight, log their trades in with DTC for official IRS reporting, etc. Pershing, which is also owned by BNY, provides clearing services for hundreds of smaller broker dealers and profit center offices that handle client orders, but are too small to afford the costs of clearing internally, and thus outsource the task to larger entities with sufficient means to handle thousands of daily trades, such as Pershing, Penson, and numerous others.