Stavo andando al lavoro quando sono stato fermato dalla polizia.

Soggetto + essere + verbo (participio passato) + [complemento di agente]
This structure is the PASSIVE FORM which allows the object of the sentence to be transformed into a subject, but this only happens with transitive verbs! For example I can say, 'Questa lettera è stata scritta dalla mia fidanzata'. In this case 'la lettera' is the subject, while 'la fidanzata' is the agent complement. This form is very useful if you want to eliminate the subject of the active sentence because the corresponding agent complement in the passive sentence is optional. In fact, you can say, 'Molti soldati sono stati uccisi'. ATTENTION! In the passive form you can also use the verb to come but only with the simple tenses, and with a future sense. For example, I can say, 'Il resoconto viene fatto ogni fine del mese.'