Fruta vs. fruto

Both 'fruta' and 'fruto' mean 'fruit' in English, but they are used in different contexts in Spanish.

Fruta

'Fruta' refers to the edible and typically sweet product of a plant that is consumed as food. It is the term most commonly used to describe fruit in the culinary context.
Me gusta comer fruta fresca en verano.
(I like to eat fresh fruit in the summer.)
La manzana es mi fruta favorita.
(The apple is my favorite fruit.)
El mercado vende una gran variedad de frutas exóticas.
(The market sells a great variety of exotic fruits.)

Fruto

'Fruto' refers to the botanical term for the part of a plant that contains seeds, and it can also be used metaphorically to refer to the result or product of an effort or action.
El agricultor cosechó el fruto de su trabajo.
(The farmer harvested the fruit of his labor.)
El árbol estaba lleno de frutos maduros.
(The tree was full of ripe fruits.)
El éxito fue el fruto de su dedicación y esfuerzo.
(The success was the fruit of his dedication and effort.)

Summary

In summary, 'fruta' is typically used when referring to edible, sweet fruits commonly eaten as food, while 'fruto' is used more in botanical or metaphorical contexts.