Spanish naming customs
Spanish names typically consist of a given name (simple or composite) followed by two surnames. Historically, the first surname was the father's first surname, and the second the mother's first surname. In recent years, the order of the surnames in a family is decided when registering the first child, but the traditional order is still usually chosen.
Often, the practice is to use one given name and the first surname most of the time (e.g. "Miguel de Unamuno" for Miguel de Unamuno y Jugo); the complete name is typically reserved for legal, formal, and documentary matters. Both surnames are sometimes systematically used when the first surname is very common (e.g., Federico García Lorca, Pablo Ruiz Picasso or José Luis Rodríguez Zapatero) to get a more customized name. In these cases, it is even common to use only the second surname, as in "Lorca", "Picasso" or "Zapatero".
This does not affect alphabetization: "Lorca", the Spanish poet, must be alphabetized in an index under "García Lorca", not "Lorca" or "García".