Children take the surnames of both parents, so if the couple above had two children named "Andrés" and "Ana", then their names would be "Andrés Gómez Reyes" and "Ana Gómez Reyes".
Traditionally in most countries, and currently in some Spanish-speaking countries, women, upon marrying, keep their own family names.