When buying shares, there are two key dates involved in the transaction. First is the trade date, which marks the date the buy order is executed in the market or exchange. Second is the settlement date, which marks the date and time the transfer of shares is made between buyer and seller. The settlement date, not the trade date, establishes a legal transfer of ownership from the seller to the buyer. While different rules govern various jurisdictions around the world, its commonly agreed that ownership is transferred when the funds are given in exchange for the security, which happens on the settlement date.
However, there is little differentiation between the two dates because it is likely that ownership will be transferred without complication or conflict after the trade date. Upon execution of the buy order on the trade date, both buyer and seller incur a legal obligation to finalize the transaction. The buyer is obligated to provide the necessary funds (cash) to pay the seller and the seller is obligated to have or obtain the adequate number of shares to transfer to the owner.
Nevertheless, there are two ways in which the settlement can fail. The first is a long fail, in which the buyer lacks adequate funds to pay for the purchased shares. A short fail can also occur; which happens when the seller does not have the security on the settlement date.
The time frame between the trade date and settlement date differs from one security to another, due to varying settlement rules. For bank certificates of deposit (CDs) and commercial paper, the settlement date is the same day as the trade or transaction date. Mutual funds, options, government bonds and government bills are settled one day after the trade date, while the settlement date for foreign exchange spot transactions, U.S. equities and municipal bonds occurs two days after the trade date. This is commonly referred to as "T +2".
To read more, see The Nitty-Gritty Of Executing A Trade.