To keep it simple, think of mealtime. If it's eaten as part of a main dinner course, then it's probably a vegetable (or classed as a vegetable). If it's eaten as part of a starter, or dessert, then it's probably a fruit (or classed as a fruit). Don't worry though - knowing the difference between fruit and veg, isn't really a big issue.
Examples of fruit (in the UK anyway) are: apples, oranges, pears, bananas, cherries, grapefruit, grapes, peaches, plums, pineapples, melons.
Examples of vegetables: carrots, turnip, peas, cauliflower, potatoes, leeks, celery.
Tomatoes are known as a vegetable in the UK - but they're actually a fruit. A banana is also a type of berry. But most people don't know any of that. So don't worry.