Farming can be used to grow various plants. As of 1.26, there are two plants you can use for food - rye to make bread and pumpkins. But you can farm several other plants as well: cotton, ivy, cacti, trees, flowers and tallgrasses. 

Farming works best on tilled soil that is placed next to water, and is fertilized with saltpeter. This is called cultivated soil. For any plant to grow, the temperature must be warm enough but not too hot and the humidity must be high enough. Rye and cotton grow best in moist, warm, cultivated soil