Fruits are the ripened ovaries containing the reproductive seeds of a plant. The plant produces flowers. The flowers are pollinated. Once pollinated, the flesh around the seeds often expands and is edible. Many vegetables are actually fruits but aren't sweet so cooks classify them as vegetables. Vegetables are the stalks, leaves, flowers and roots of edible plants. The differences between fruits and vegetables are confusing since many fruits are classified as vegetables by the general public.
Look at the plant. Legumes are seeds held within a pod that has two side seams. They are considered vegetables but are actually fruits. Peas and beans are the two most common types of legumes. Sometimes the outer casing is edible, such as string beans, and sometimes it's not, as in the case of lima beans.
Determine where the seeds are produced. If the seeds are inside an outer casing and the casing is consumed, then the plant is a fruit. Cucumbers, peppers, tomatoes and eggplants are all fruits. Grains are fruits of grasses and include corn. Squash and pumpkins are fruits as well.
Determine what part of the plant is eaten. If it's not the casing or the seeds, then the plant is considered a vegetable. Leafy vegetables include spinach, lettuce and chard. Flowers that are considered vegetables are broccoli, artichokes and cauliflower. Roots that are considered vegetables are carrots, radishes, rutabagas, parsnips and beets. Potatoes are the reproductive tubers of the plant and are vegetables. Potatoes do produce a fruit, but like all parts of the plant except the tuber, potato fruits are toxic.
Taste the item. If it's sweet like an apple, pear, blueberry or grape, most people would consider it a fruit. If it's not sweet, most people would consider it a vegetable.