|MadSci Network: General Biology|
Fruit refers specifically to the specialized structure arising from ripening of the plant's ovaries to encapsulate the seeds. Generally this refers to thickened, fleshy structures, like apples, tomatoes, bananas, melons, etc., which promote animals to carry the seeds away from the plant. Any other edible parts of the plant, i.e. leaves, stems, roots, are grouped together as vegetables. The confusion comes with fruits that are not sweet or are used in non-traditional ways, like cucumbers, squash (including pumpkins and zucchinis), avocados, and technically even peapods (though peas and beans are seeds, which have classifications of their own), which are all fruits.
Try the links in the MadSci Library for more information on General Biology.