Fruit is both a botanical classification and a culinary classification of plant parts.
The ripened ovary or ovaries of a seed-bearing plant, together with accessory parts, containing the seeds and occurring in a wide variety of forms.
Botany is the scientific study of plants. Botanically, a fruit is the part that is around a seed. Usually this is fleshy, but it doesn't have to be. I'm not a botanist, so if you need to know the specifics of this definition, you have probably studied it a ton in school. I've classified what is and isn't a fruit botanically, so that should suffice for most.
Notably, a fruit under this definition does not have to be sweet or even edible. It just has to contain a seed. Don't base your cooking on this definition.
An edible, usually sweet and fleshy form of such a structure.
"Culinarily" means in a cooking context. Culinarily, what is and isn't a fruit is a bit more vague. They are always things that are botanically fruits. They're fleshy. They're often colorful. They're usually very sweet, often making them used in desserts. They're usually eaten raw. You know, they're just what you would normally think of as "fruit." They're things that you would put in a fruit salad.