The difference between a vegetable and a fruit is that vegetables are the edible portions of a plant, such as the leaves, stem, roots, tubers, bulbs and flowers, while a fruit is the mature ovary of a plant. Many plants that are considered fruits are botanically vegetables.
Some plants commonly known as vegetables, such as tomatoes, squash, pepper and eggplant, are botanically fruits. Fruits don't have to be sweet. Fruits provide protection for seeds in many plants and aid in the distribution of seeds.
In nature, plants produce fruit only after fertilization. However, widely cultivated plants produce fruit without fertilization through a process called parthenocarpy.