Time required to settle a trade is called settlement cycle. On Indian Exchanges, settlement cycle is for T+1 days wherein T refers to Trading. So settlement cycle would be the day you took the trade + 1 day. This goes same for both buying or selling the securities.
Let's understand this by an example:
Buying securities/shares:
1 - On Monday (T day), shares are purchased.
2 - Tuesday (T+1 day) is the day after the shares are credited to the demat account.
Selling securities/shares
1 - On Monday (T day), shares are sold.
2 - The money is credited to the trading account on Tuesday (T+1 day). The trading account can only be used to withdraw these only after Tuesday evening.
For Example (F&O segment)
1 - On Monday (T day), long/short futures or short position is initiated.
2 - Any credit obligation of funds in the form of premiums or Mark to Market (MTM) is settled to the trading account on Tuesday (T+1 day). In case of credit MTM amount can only be withdraw after Tuesday night. Any fund debit obligation is settled from the trading account on the same day, or T day.
Note : If there is a settlement holiday, it will take an additional day for the settlement process.