The word fruit can be very specific, referring to foods like berries and apples, or a bit more general to refer to how an organism reproduces. So tomatoes and rosehips are the fruits of those plants; they contain the seeds. Mushrooms are the fruits of a fungus; they contain spores. So when a fungus starts to produce mushrooms, we call that fruiting.