[v5: う-row → あ-row] + れる [v1: drop る] + られる [する → される] [来る → 来られる]
The passive form (受身形) says that something is done to the subject. A う-verb moves its last sound to the あ-row and adds れる; a verb ending in う takes わ, so かう買う becomes かわれる買われる. A る-verb drops る and adds られる. する becomes される and くる来る becomes こられる来られる.
The one who does the action takes に. The passive verb is a る-verb and conjugates like one: 書かれます, 書かれた, 書かれない.
When the action is done to your body or your belongings, you are the subject and the thing keeps を. English says "my foot was stepped on"; Japanese says "I was stepped on the foot".
The passive also says that someone else's action caused you trouble, even when it was not done to you. Verbs that have no passive in English, like "rain" and "cry", work here.
Because of this, a passive with a person as its subject often sounds unwelcome. For a kindness done to you, use てもらう or てくれるinstead.
These go beyond the everyday passive.
For who wrote, built, designed or discovered something, the agent takes によって instead of に. This is a written style; ordinary passives keep に.
For a る-verb and for 来る, the passive looks the same as the potential: たべられる食べられる is "is eaten" or "can eat". The particles tell you which. In casual speech the potential often drops ら (たべれる食べれる), but the passive never does: ×食べれた for "was eaten".