I actually just did research on this topic get ready to learn :D
It is both! Fruit is a classification of plants, while also being used in a culinary context. "Vegetable" is only a culinary word, as all vegetables are either roots, leaves, or fruits. So a tomato is a fruit in the biological sense, whereas in the kitchen, it's a vegetable! :D