The Apostille is a certificate proving that the signature on a public document is authentic.
For example, when dealing with an inheritance, if you need to prove that you are heir, you will need to present Marriage or Birth Certificates. These Certificates will have to be legalised with the Apostille Certificate. You will also need to request the Apostille if you sign a Power of Attorney with a Notary in your country. The POA will not be valid in Spain unless it has been legalised with the Apostille.
It is a certificate commonly used in Spain when having cases which require presenting foreign paperwork, so do not be surprised if your lawyer asks you to legalise any documents.
The Apostille has to be requested in the country where the document was issued, therefore, if you have a birth certificate from Ireland, you will not be able to legalise it in Spain.
Each country has its own way of legalizing documents, normally you can find on the Internet how to do it, or you can ask to a Notary how to do it.
You can find more information about legalising a document in the UK in the following link.
You can find more information about authenticating a document in Ireland in the following link.