How do farms work in Minecraft?

How do farms work in Minecraft?

See also  Is lucky a boy or girl Animal Crossing?