The Legend explains what each Color, Shape or Group represents when a feature is mapped to the corresponding dimension. It is also a useful way to filter your visualization by showing and hiding specific categories and bins.
The settings icon on the top right of the panel allows you to change how the list is sorted between Frequency (default) and Alphabetically. It also allows you to change between showing the visible points / total points (default) and showing the percentage of visible points in the Details list.
Categories can be renamed from the Legend panel by right-clicking on the category you would like to change and entering a new name. Note that this change will persist in the loaded dataset.