There are some subtleties and intricacies, but quick description is a comparison: HAVING is to GROUP BY as WHERE is to SELECT.
In other words, if you think of HAVING as a WHERE clause that gets applied after the GROUP BY clause, things start to make sense.