The passive voice in Spanish takes the verb ser and the past participle. You must conjugate the verb according to the tense needed and make the past participle match the gender and number of the subject.
For example: La novela fue escrita por un hombre joven (The novel was written by a young man)
However, the above form of the passive is usually only used in more formal, written contexts and is becoming less and less common in everday written language and speech.
Here are several common ways of avoiding the passive voice:
a) Use se and the third person (he/she/it) form of the verb
For example: se dice que la comida es muy cara en Londres (it is said that food is very expensive in London)
If the verb is followed by a plural noun, you must use the third person plural of the verb
For example: en los EEUU se comen muchas hamburguesas cada día (many burgers are eaten every day in the USA)
If the verb is reflexive, you must use uno to express the passive se
For example: en España uno se acuesta muy tarde (in Spain people go to bed very late)
b) Use the third person plural of the verb
For example: me detuvieron (I was arrested)
c) Use the active voice
For example: mi padre preparó la cena (my father prepared dinner)
d) If you wish to emphasise the object (the passive voice does this by putting the object first), use the active voice and place the corresponding accusative pronoun after the object and before the verb
For example: las cartas las escribió mi hermano (my brother wrote the letters)