If you specific an x-axis categroy but no subcategory (ie for a one-way ANOVA) then key shows the groups within the category.
If both a category and a subcategory are specificed, then the key shows the subgroups within the subcategory.
There are some display options for the key, which are accessible under the "Graph" -> "Elements" -> Key submenu, or in the Graph Inspector "Options" subpanel. As shown below, you can display a label for the key (the name of the category or subcategory), draw a frame around the key, and/or reverse the order that the groups are listed in the key.