Basically, most vegetables are the fruit of a plant.
Some vegetables are the plant, root, stalks, or leaves of the plant. Tomatoes are made so seeds can be spread because it is the fruit of the tomato plant.
If you are regarding to cooking, a tomato is a vegetables. Scientifically, it is a fruit.
Vegetables = Savory Cooking
Fruit = Sweet Cooking