It's important to remember that "blue-green algae" is an outdated term. The correct term for these organisms is cyanobacteria.
Lichen is a composite organism that arises from a symbiotic relationship between a fungus and a photosynthetic partner, which is usually a cyanobacterium or an alga. The fungal partner is called the mycobiont, and the photosynthetic partner is called the photobiont.
The mycobiont provides structure and protection for the photobiont, while the photobiont provides food for the mycobiont through photosynthesis. This mutually beneficial relationship allows lichens to thrive in a wide range of environments, including harsh and extreme conditions.