newMap = a map of all records in your trigger. The key used in the map is the record ID, and the value is the record itself. More info: http://www.sfdc99.com/2014/01/12/introduction-maps/ . keySet() is a method used on maps that returns all the keys of the map