according to Wikipedia ‘a lichen is a composite organism that arises from algae or cyanobacteria (or both) living among filaments of a fungus in a symbiotic relationship. The combined life form has properties that are very different from the properties of its component organisms.’
The algae/cyanobacteria produce sugars by photosynthesis that they share with the fungi in exchange for protection, moisture and minerals. They are very tough, occurring from desert to tundra and very old. They evolved at least 400 million years ago and live longer than most organisms.
Breaking news: all lichens also contains another fungus that coats the other 2 participants and holds them together. Everything you want to know about lichens can be found on this website.