The structural motifs of a Zr50Cu45Al5 metallic glass were learned from atomistic models using a new structure analysis method called motif extraction that employs point-pattern matching and machine learning clustering techniques. The motifs are the nearest-neighbor building blocks of the glass and reveal a well-defined hierarchy of structures as a function of coordination number. Some of the motifs are icosahedral or quasi-icosahedral in structure, while others take on the structure of the most close-packed geometries for each coordination number. These results set the stage for developing clearer structure-property connections in metallic glasses. Motif extraction can be applied to any disordered material to identify its structural motifs without the need for human input.