Take this example:
One day, a boy was walking to the store and a ball hit him in the face. He bent down and picked up the ball. Before he could reach it, the ball was taken away by Steven.
Now, before we dissect this paragraph we need to understand what is a subject and what is an object and what is a verb. And what makes a sentence passive. Notice the boxes below:
1) All sentences will have a form of the verb - to be: is, was, has been, will be, can be, is being, was being, had been, will have been, would be, would have been.
2) You could have the word BY in the sentence. I say 'could' because this sentence: "A letter was written." does not have the word by but it is passive. When you read the sentence, in your head you could add the word 'by' when continuing.
3) Object comes before the subject.
Now, lets dissect those sentences.
Object Subject TO BE verb BY
(Active) 1) One day, a boy was walking to the store (Most people would think this is a passive sentence but it isn't. Though it has a TO BE verb, the subject still comes before the object and there is no BY required.)
(Active) 2) and a ball hit him in the face.
(Active) 3) He bent down and picked up the ball.
(Active) 4) Before he could reach it,
(Passive) 5) the ball was taken away by Steven. (This is a passive sentence. The object comes before the subject, the TO BE verb is there and so is the word BY.)