A fruit is a ripened ovary containing seeds; actually quite similar to the human ovary in comparison. In the case of the pomegranate for example, the whole thing is the ovary of the plant and the seeds within are the equivalent of eggs. This is an incredibly encompassing definition, and many of the foods that we eat are fruits even though we don’t consider them so; tomatoes, squash, green beans, peas, eggplant, cucumber and nuts. Fruits tend to be fleshy with the seeds lying inside the fleshy part, so nuts are more considered to be an edible seed, rather than a fruit, although scientifically, they are classified as such. Surprisingly, cereal grains are considered a fruit as well, but the amount of flesh surrounding the seed is so minimal, they are more referred to as edible seeds rather than fruit.
So, a fruit is both a culinary and a scientific term. Some plants technically defined as fruit, are thought to be vegetables by the culinary definition. In contrast, the term vegetable is much more arbitrary and is used by people to describe plants that are not sweet and served in a savory manner. The term vegetable is not a scientific term as much as a category of food. Vegetable generally refers to any edible part of a plant. Vegetables include potatoes, broccoli, leafy vegetables, celery, asparagus, onions, garlic and shallots.
So the difference between the two terms comes down to this; the term fruit is both a scientific and botanical description of a type of plant and the term vegetable is used by people to describe a certain category of food.