Yield farming is the practice of putting crypto to work inside decentralized finance protocols in order to collect the rewards those protocols pay, and moving it when a better-paying opportunity appears. A subcommittee presentation to the CFTC's Technology Advisory Committee sets out the vocabulary precisely: participants who deposit assets in a liquidity pool lock their assets and often earn fees and automatically receive digital assets in the form of governance tokens; the practice of submitting assets to a protocol is increasingly referred to as liquidity mining, and the process of earning fees and governance tokens is referred to as yield farming. That presentation is a subcommittee product and does not necessarily reflect the views of the advisory committee, of the CFTC or its staff, or of the United States government, and it dates from December 2020, so it is reliable for the vocabulary and the mechanics rather than for anything about today's market.
The word yield does a lot of work in the name, and it is worth separating from what the word means elsewhere in finance. A bond's yield is a payment promised by a borrower. A farming yield is a share of trading fees plus a quantity of a token the protocol prints, and neither component is promised by anyone.