A futures contract is not closed out by returning it to the party it was purchased from.
Buyers and sellers of futures do not usually take delivery or make delivery of the underlying asset. They simply offset their positions by the delivery date. For example, someone who purchases Treasury bond futures contracts would simply sell similar futures contracts by the settlement date, the obligations would net to zero, and the hedger or speculator would have either a gain or a loss on the transactions.
Buyers and sellers of futures do not usually take delivery or make delivery of the underlying asset.
An option expires on its maturity date, and there is no need to do anything to close it out. However, if a futures contract is not closed out by its maturity date, the holder of the contract on its maturity date will be obligated to either purchase and take delivery of the underlying asset, or sell and make delivery of the underlying asset.