Officially Spanish people have two surnames, e.g., Federico García Lorca, where Garcia is from the father and Lorca is the mother's name. I think this holds for all Hispanophone countries, e.g., Fidel Castro Ruz, who is known by his paternal surname, Castro. I think the 'y' is superfluous, maybe even an affectation. In Spain the Hidalgo class uses four surnames, father's surnames then the 'y' then mother's surnames. So perhaps the y is some sort of status symbol. As the father's name comes first the second surname will usually change with each generation, e.g., Ernesto Guevara de la Serna, son of Ernesto Guevara Lynch. In Portugal both parent's surnames are used but there the paternal name comes last.