Active Voice and Passive Voice
You may not realize it but most of the sentences you use are in what's called the "active voice." What this means is that the subject of the sentence did the action of the verb. For example:
Mateo wrote the poem.
Here "Mateo" is the subject and he is the one who did the writing this is active voice.
There is also another style known as the "passive voice." In the passive voice the subject no longer does the action of the verb, but rather has the action done to it. To achieve this, we're going to turn the direct object from the first sentence into the subject:
The poem was written by Mateo.
In this case the subject, "the poem," did not actually do the verb; the verb was done to it this is passive voice. Notice that the former subject, "Mateo," is now the object of a preposition at the end of the sentence.
Note: Most English teachers prefer that you use the active voice as much as possible when writing.
The meaning of the two sentences is essentially the same, so why would you choose one voice over the other? Passive voice allows you to vary your sentences making your writing a little more interesting, and it allows you to shift the focus of the sentence from the agent (Mateo) to the object (the poem). The passive voice also gives you the option of downplaying or ignoring the agent of the action altogether. Like this:
The poem was written.
The house was robbed.
Many mistakes were made.
The Passive Voice in Spanish
Ser, Past Participles, and Por
In the English examples above the passive voice was constructed by using a form of "to be" with a past participle. We'll do the same thing in Spanish using ser. For example:
Mateo escribió el poema.
El poema fue escrito por Mateo.
Los ladrones robaron la casa.
La casa fue robada por los ladrones.
Yo cometí muchos errores.
Muchos errores fueron cometidos.
All of the passive voice sentences employ a form of ser which has been conjugated to agree with the number of the subject (fue or fueron). The examples also use past participles. Notice that because they are functioning as adjectives in the passive voice they need to agree in gender and in number with their subjects (poema / escrito, casa / robada, and errores / cometidos).
Also notice that we use the word por to identify the agent of action. In the last example the agent (yo) was omitted, probably to avoid taking the blame.
Although it occurs less frequently, it is possible to use the passive voice in other tenses as well:
El poema será escrito por Mateo.
The poem will be written by Mateo.
La casa había sido robada por los ladrones.
The house had been robbed by the thieves.
Muchos errores son cometidos.
Many mistakes are made.
The Passive Voice with the Impersonal Se
While there's nothing wrong with using ser and a past participle for the passive voice, there is a much more common construction that involves the word se. It doesn't have an English equivalent.
As you may recall we use the "impersonal se" when we're referring in general terms to a person or people. For example:
¿Cómo se escribe esa palabra?
How does one write (spell) that word?
¿Se puede salir aquí?
Can you exit here?
Se dice que ella es muy bonita.
They say that she is very beautiful.
While all of these translations are active voice (because the subjects are doing the actions), the impersonal se can be and often is translated in the passive voice:
Gasoline is sold.
Se alquila apartamento.
Apartment for rent.
Se hablan español y ruso.
Spanish and Russian are spoken.
To use the impersonal se in the passive voice, simply start with se. Then conjugate your verb in the third-person, either singular or plural, depending on the number of things upon which the verb is acting. For example, in the first two sentences, we only have one thing (gasolina, apartamento) so we conjugate in the singular (vende, alquila). In the last sentence, we have two languages (español y ruso) so we conjugate in the plural (hablan).
These impersonal se expressions are preferred to the ser form of the passive voice, especially in the present tense. It is possible to use the impersonal se in other tenses as well:
Se hablaban español y ruso.
Spanish and Russian were spoken.
Se alquilará el apartamento.
The apartment will be rented.