Fortunately these days, if you don’t know the Spanish language, translating basic documents is relatively easy. There are abundant translation apps such as the popular Google Translate which a quite accurate. Of course, if you need to have a Spanish translation of a more detailed or official document, you’ll need to get someone to do the translation for you.
There are various types of official document translations and certifications that you might need when living in Spain or during the process of applying to do so. E.g. for visa and residency applications.
These are translations done by an official translator who is legally authorised as a translator. Sworn translations, are accompanied by a signed declaration from the translator attesting to the accuracy and authenticity of the translation. The translator appears on an official list of certified translators and interpreters approved by the Spanish Ministry of Foreign Affairs. The translator will sign and certify any translations they complete.
Sworn translations have a formal status with authorities, so these are what you have to get when you need to translate documents for things like visas, residency applications, social security etc.