Oftentimes Spanish (or otherwise Hispanic) people have two "last" names.

Generally, the first surname is the father's, and the second is the mother's. In this case the first one is the 'main' one and takes the stage when only one name is used.

Thusways, given some hypothetical people named Juan Enrique Gonzales Rodriguez and Elena Maria Rivera Herrera, their hypothetical son and unmarried daughter would be surnamed Gonzales Rivera.

For a married woman it's slightly different: the first surname is still the father's (her maiden name), but the second is the husband's. Usually there'll be a conjunction like 'de' thrown in there for good measure. So Juan's wife would be something like Elena Maria Rivera de Gonzales.