If you look at the top of the walls of a typical castle they have taller and shorter parts, the shorter parts were to allow archers to shoot their bows through them, the higher ones to shelter behind. It looks like a kind of saw blade. This is called crenellation.