When you present official documents like birth or marriage certificates to a public authority abroad, they might ask you to have the document ´legalised´. You can do so by applying for an Apostille from the relevant authority in the country where the document originates.
The document will be stamped, and this stamp implies the authenticity of the document has been verified and found to be in order.
The term ´Apostille´ refers to Apostille of The Hague, a treaty signed in The Hague on the 5th of October 1961. All countries that signed the treaty, agreed to accept this stamp reciprocally.
A complete list of the countries that have signed the treaty.
Link to Gov.Uk website on how to legalise documents from UK.
Link to the Ministry of Justice in Spain. You can apply for translations of birth, marriage or other certificates with the Apostille of the Hague (Apostilla de la Haya)