Funding payments are predominantly used by cryptocurrency derivatives exchanges to facilitate perpetual contracts. The sole purpose of funding payments is to drive the trade price closer to that of the index price for the underlying asset.
Being derivative in nature, the price for the perpetual contracts is never the same as the underlying asset. This price discrepancy between the perpetual market and the spot market can be mitigated using funding payments.
Funding payments work in a completely automated way where it sends payments between traders after a fixed interval. The traders on the less popular side (short side) get paid by the traders on the more popular side (bullish side). This way, the less popular side can be incentivized to open a position, thus driving the price close to the spot price.