Petting a farm animal, milking a cow or goat, shearing a sheep, or picking up an animal product inside a coop or barn gives 5 experience points each. Picking up [[Truffle]]s gives [[Foraging]] experience rather than Farming experience.
To level up farming from level 0 to 1, it takes 12 parsnips, or 8 potatoes, or 5 cauliflowers. From level 0 to 2, it takes about 48 parsnips, or 28 potatoes, or 17 cauliflower plants.