Companion planting is the practice of placing plants together in a way that benefits one or both plants, such as deterring pests or improving soil fertility.