Agriculture is essential to humanity. Without a well functioning system of farms, there will not be enough food to feed humans. A lot of effort is going into making sure that farming will be able to deliver the necessary food in the future. Since agriculture is so sensitive to climate changes most of the effort is concentrated on slowing down climate change and preparing agriculture for the changes that will come in the future.
In some regions global warming will lead to an increased yield. In fact, more CO2 in the atmosphere will generally lead to increased plant growth. This means that farms in some areas will be able to produce more food from a given area of land.
Unfortunately, climate change will lead to smaller yields in many of the areas where food is already most scarce. This is because many other factors also change. If temperatures become very high and there is no rainfall crop growth will decrease, even with more CO2 in the atmosphere.
Farming also has an effect on climate. There are greenhouse gas emissions from the machines used to cultivate the land and transport the food from the country into the cities. Agriculture, through cattle and other animals, is also the biggest emitter of the potent greenhouse gas methane.
Farming also takes up very big areas of land. When land is changed from natural forest into fields, the albedo changes and less of the sunlight is reflected back into space.
Intensive land use also reduces the soils' ability to function as a carbon sink. This means that less CO2 can be held in the ground and more will be released into the atmosphere further contributing to the greenhouse effect.