How Filipino surnames began
Most Filipino surnames are Spanish in form because of an 1849 decree by Governor-General Narciso Clavería, which distributed a catalogue of surnames (the Catálogo alfabético de apellidos) to families across the islands to make tax and census records easier. Alongside these, many families kept native Tagalog, Visayan or other indigenous names, and Chinese-Filipino families often carry names formed from a Chinese ancestor's full name.
How the names work
Filipino naming usually follows the Spanish pattern adapted to American usage: a person has a given name, the mother's maiden surname as a middle name, and the father's surname last. Women traditionally take their husband's surname at marriage and keep their own as a middle name. Because the Clavería catalogue was sent out in alphabetical blocks, whole towns sometimes have surnames starting with the same letter.