This depends on the type of future you are buying. Perpetual futures have no expiry date, which means you can hold them indefinitely. Some futures have a fixed date on which they expire: this happens, for example, once every quarter. Your results are settled at the end of the period.