Tomatoes are botanically defined as fruits because they form from a flower and contain seeds. Still, they’re most often utilized like a vegetable in cooking. In fact, the US Supreme Court ruled in 1893 that the tomato should be classified as a vegetable on the basis of its culinary applications.
It’s not uncommon for culinary practices to blur the lines of scientific definitions of what constitutes a fruit or a vegetable. Many plants that are considered to be vegetables are actually fruits.
For all intents and purposes, tomatoes are both. If you’re talking to a farmer or gardener, they’re fruits. If you’re talking to a chef, they’re a vegetable.