A wall cap is the top part of a masonry wall, which has the purpose of protecting it. It is usually sloped and built in such a way that water will flow away from the vertical face of the wall.
Example:
After building the wall, the masons put a wall cap over it.