Little holes, called machicolations, were often located in walls of castles and city walls. The roof would project over hanging rock so that holes would be located over the exterior face of the wall, and arrows could be shot at, rocks dropped on, or boiling water poured over, any enemies near the wall.
we got this picture from www.castlexplorer.com