UML class diagrams visually represent the structure of a system by showing the system's classes, their attributes, and the relationships between classes. They can show static variables and operations with underlines, associations between classes with lines and arrows to indicate directionality and multiplicity, generalization relationships to represent inheritance, realization relationships to represent interfaces being implemented, and aggregation and composition relationships to represent "has a" relationships between whole and part classes. UML class diagrams provide an overview of the key classes in a system and how they relate and interact.