From a scientific point of view, a tomato is a fruit, but it is treated as a vegetable in cooking. Biologically, tomatoes develop similarly to many fruits, but cooks use them like vegetables in dishes that are not sweet.
Tomatoes develop from the plant's ovary, which is located in the flower. On maturation, they contain seeds, as do other fruit. In turn, under the correct conditions, these seeds produce other plants. Vegetables do not develop from a plant's ovary but are edible portions of that plant that, by themselves, do not produce other plants. Botanically, the tomato is in the berry group of fruits.