From Wikipedia...
In Spain, upon marrying, the woman does not change her surnames to adopt her husband’s because Spanish naming customs do not include the maiden name concept — thus, when Leocadia Blanco Álvarez marries Pedro Pérez Montilla, she retains her original name Leocadia Blanco Álvarez. Moreover, in chapter V, part 2 of Don Quixote (1605, 1615), Teresa Panza broaches this matter by reminding husband Sancho that, properly, she should be addressed as Teresa Cascajo, by her paternal surname, not her marital surname, to wit: “Teresa I was named in baptism, a clean and short name, without addings or embellishments, or furnishings of dons and dans; ‘Cascajo’ was my father; and I, as your wife, am called ‘Teresa Panza’, but laws are executed”.[5]
However, the husband's surname can be added after the woman's first surname using the particle "de". Leocadia Blanco Álvarez, married to Pedro Pérez Montilla, can be addressed as Leocadia Blanco de Pérez. This format is not common in everyday use; it's mostly reserved for situations where the relationship to the husband is to be stressed.
To sum up, if a man named Fernando García Pons marries a woman named Paula Rodríguez Pérez, their child Salvador would be named Salvador García Rodríguez, more likely than not.
In the generational transmission of surnames, the paternal surname’s precedence eventually eliminates the maternal surnames from the family lineage. Contemporary law allows the maternal surname to be given precedence, but most people observe the traditional paternal–maternal surname order. So the daughter and son of Ángela López Sáenz and Tomás Portillo Blanco are usually called Laura Portillo López and Pedro Portillo López, but also could be called Laura López Portillo and Pedro López Portillo. Regardless of the surname order, all children's surnames must be in the same order when recorded to the Registro Civil.
Patrilineal surname transmission was not always the norm in Spanish speaking societies. Prior to the mid-eighteenth century, when the current paternal-maternal surname combination norm came into existence, Hispanophone societies often practised matrilineal surname transmission, giving children the maternal surname, and, occasionally, gaving children a grandparent's surname (borne by neither parent) for prestige — being perceived as gentry — and profit, flattering the matriarch or the patriarch in hope of inheriting land. As with Catalan names, the Spanish naming customs include the orthographic option of conjoining the surnames with the conjunction particle y (meaning "and"), e.g. José Ortega y Gasset, or Tomás Portillo y Blanco, following an antiquated aristocratic usage.
Not every surname is a single word; such conjoining usage is common with doubled surnames (maternal-paternal), ancestral composite surnames willed to the following generations — especially when the paternal surname is socially undistinguished. José María Álvarez del Manzano y López del Hierro is an example, his name comprising a composite (two-word) single name, José María, and two composite surnames Álvarez del Manzano and López del Hierro. Other examples derive from church place-names such as San José. When a person bears doubled surnames, the means of disambiguation is to insert y betwixt the paternal and maternal surnames.
In case of illegitimacy — when the child's father either is unknown or refuses to legally recognise his son or daughter — the child bears both of the mother's surnames.
Occasionally, a person with a common paternal surname and an uncommon maternal surname becomes widely known by the maternal surname. The artist Pablo Ruiz Picasso, the poet Federico García Lorca, and the politician José Luis Rodríguez Zapatero are examples. With similar effect, the foreign paternal surname of the Uruguayan writer Eduardo Hughes Galeano (his father was British) is usually omitted. (As a boy, however, he occasionally signed his name as Eduardo Gius, using a hispanized approximation of the English pronunciation of "Hughes".) Such use of the second last name by itself is colloquial, however, and may not be applied in legal contexts.