When you say "the house was built" or "the letter is being written," you're describing an event that happened to something without saying who performed the action — and that's exactly what the passive voice, or Passiv, does in German. German builds this form very systematically using the helper verb werden, rather than relying on context or word choice alone to signal that the subject is on the receiving end of the action.
We use Passiv when the doer of an action is unknown, unimportant, or when we want to focus on the event and the thing affected by it rather than on who did it. This is extremely common in formal German — news, legal regulations, instructions, and shop or factory signs — so you'll meet it constantly in daily life, from a sign reading "Hier wird nicht geraucht" (no smoking here) to the instructions printed on products.
Structurally, the rule is: helper verb werden, conjugated for subject and tense, plus the Partizip II of the main verb at the end. In Präsens: werden + Partizip II, as in "Der Brief wird geschrieben." In Präteritum we use wurde instead of werden, as in "Das Haus wurde gebaut." In Perfekt we use ist/sind + Partizip II + worden — note worden is a special Passiv-only form, used instead of the usual geworden.
A crucial point: converting a sentence from active (Aktiv) to passive (Passiv) turns the original direct object into the new subject. "Der Mann baut das Haus" becomes "Das Haus wird gebaut" — das Haus moves from accusative object to nominative subject at the front of the sentence.
If you still want to name who acted, you have two options: von + dative for the actual living agent ("von dem Mann"), and durch + accusative for a means or non-living cause ("durch ein Feuer"). This von/durch split trips learners up because many languages use a single word like "by" for both.
The most common mistake is forgetting that the agent is entirely optional — some learners insist on always naming it with von, when in fact most real Passiv sentences never mention the agent at all, since leaving it out is the whole point of the form.