The future date by which the contracts have to be fulfilled is called the derivatives expiry. The exchange has decided that the contracts can only expire on the last Thursday of every month. If this happens to be a trading holiday, then the previous trading day would be counted as the expiry date. 

Derivates settlement:

On the expiry day, the contracts are settled (or simply get expired in case of Options). This can be done by two ways - you can buy another contract which nullifies your contract, or you can settle in cash. 

For example, suppose you buy a futures contract which allows you to buy 100 shares of ABC company, then to close the contract, you can buy another futures contract which allows you to sell 100 shares. You will then have to pay the difference in the price of the contract. Each contract is traded at a specific value. This is connected to the underlying stock's price in the secondary stock market (cash market)-where you buy and sell stocks directly. So, the settlement value of each contract is tied to the closing price of the stock on the last day.