A lichen is formed of two or more organisms,a fungus which forms the body of the lichen which
in Xanthoria parietina consists of flattened spreading leaf-like lobes,
and a green chlorococcoid alga which provides the nutrients for the fungus through photosynthesis.
Xanthoria parietina belongs in the family Teloschistaceae which consist mainly of brightly coloured
lichens that contain a compound that acts as both a sunscreen for the algal partner
and also protects them from harmful UV rays.
Hence Xanthoria is often found in sunny exposed places.
More info on : Natural History Museum