Farm is the deliberate accumulation of resources in a game: gold, experience, items, in-game currency. A player repeats the same action over and over, which brings a steady, if small, reward, and gradually grows stronger as a result. The verb "to farm" means "to engage in farming," and "to farm up" means "to accumulate as a result of farming."
Where the word comes from
The word comes from the English "farming" — agriculture. The comparison is easy to grasp: just as a farmer grows a harvest day after day, a player methodically "harvests" rewards. The term first took hold in online role-playing games, where a character spends hours killing the same monsters for items and experience. It then spread to other genres and became general slang.
How the word is used
Most often, "farm" is contrasted with active play: fighting, pressuring an opponent, contesting objectives on the map. Typical phrases: "he's lacking farm," "go farm," "got his farm and moved out to fight," "deny the opponent's farm." When a player is said to "farm well," it means they accumulate resources quickly and without losses.
In Dota 2
In Dota 2, farm is one of the foundations of the game. Heroes gain gold and experience by last-hitting creeps (computer-controlled creatures that move along the lanes) and neutral monsters in the jungle. The skill of landing the killing blow on a creature at the right moment to get its gold is called a last hit (we have a separate article on it). Heroes who need many items to come into their own are considered farm-dependent: teams try to give them calm time on the map. That is why team play follows a simple rule: resources are distributed so that they go to those who will best turn them into power for the team.
Players also distinguish between "jungle farm" and "lane farm." The former means killing neutral monsters between the lanes; the latter means last-hitting waves of creeps in the lane itself. The choice between them depends on the hero, the situation, and the team's plan.
In CS2
In CS2, the word in its usual sense barely applies: there are no heroes, no gold for killing creatures, and no item accumulation. If a player "farms" in CS2, it usually isn't about the match itself but about side activities: earning in-game rewards, skins, or account experience. Occasionally, in casual speech, "to farm frags" simply means to rack up a lot of kills, but this usage is jocular and is not an established term.
In other games
In many games with progression and rewards, farming means repeating the same quest or route for a resource. It is often described with the word "grind" — long, monotonous accumulation. The difference is one of nuance: grind emphasizes monotony and duration, while farm emphasizes the goal itself of obtaining a specific resource.
Good and bad farming
Farming for its own sake is never useful: if a player accumulates resources for too long and doesn't take part in the game, the team loses tempo. The opposite is also considered a mistake: throwing yourself into fights without items and experience, with no reserve of strength. That is why games with an economy constantly call for a balance between accumulation and action, and the ability to hold that balance often distinguishes a confident player from an inexperienced one.