The head of a glacier is the 'upstream' end of the glacier. The headwall is the cliff or mountain face that the glacier head abuts against. A glacier may have multiple heads, and thus multiple headwalls.
Headwalls are a site of valley growth, as new ice formed at the head of the glacier (particularly when the ice is formed by freezing water rather than by compacting snow) may freeze into cracks in the rocks and around protuberances; as the glacier continues to flow downhill, it can pluck these embedded (techspeak: entrained) rocks out of the mountainside. Cirques are an example of the sort of erosion that can happen at a headwall.
When glacier ice pulls away from the headwall, the resulting crevasse is called a bergschrund if the headwall retains an ice apron (a layer of ice and snow), or a randkluft if it is bare rock.