Could someone clarify what the shadow map actually does?

Cheers

Static