"Fruit" has a precise botanical meaning, being a part that developed from the ovary of a flowering plant.
While peaches, plums, and oranges are "fruit" in both senses, many items commonly called "vegetables", such as eggplants, bell peppers, and tomatoes, are botanically fruits.