How do farms work in Minecraft?

How do farms work in Minecraft?

See also  Who is hosting the 2030 Olympics?