Farmer is the villager profession attached to the composter, and the only one that actually works the land. Put a composter beside an unemployed adult and it takes the job — that is the whole of how to make a farmer — and breaking the composter again re-rolls its stock, right up until its first completed trade locks the profession in place for good.
What sets it apart from every other profession is the labor. A Farmer walks the village crop plots, harvests ripe wheat, carrots, potatoes, and beetroot, replants the seeds behind itself, and carries the produce in its own inventory. It then throws bread and vegetables to villagers who have none, and that sharing is what makes the rest of them willing to breed. A village with no Farmer tends to stall, which is why a breeder built from scratch usually needs one on staff feeding everybody else.
Its farmer trades run in both directions: it buys the crops you grow in bulk and sells cooked and processed food back, so a wheat field becomes emeralds and emeralds become food you never had to cook. Spare seeds go into its composter and come back out as bone meal, the quiet by-product of a farm you are not even watching.
Because a composter is one of the simplest job site blocks to build, a Farmer is usually the first profession set up in a new trading hall. Curing a zombified one permanently lowers its prices, and any Farmer kept out of reach of its composter will not restock, so leave the block where it can get to it.