Earlier people were Hunter-gatherers, who had traveled to the area in search of food, began to harvest (gather) wild grains they found growing there. They scattered spare grains on the ground to grow more food. Before farming, people lived by hunting wild animals and gathering wild plants. When supplies ran out, these hunter-gatherers moved on. Farming meant that people did not need to travel to find food. Instead, they began to live in settled communities, and grew crops or raised animals on nearby land.

Early men observed the nature. He saw how seeds grew into plants that bear fruits and vegetables, food. He realised how much useful can animals be. So he started cultivating crops and domesticating animals. For cultivating crops he settled down and made shelters, learned pottery, made new tools as now he needed them. (U know, necessity is the mother of invention). This all made him a farmer from the hunter-gatherer.
This came to b known as Neolithic revolution. This came about 10000 years ago.