In the passive voice, the subject of the sentence receives the action. For example, you have the sentence "I ate the pie". I ate the pie is the active voice. Since you want the subject, I, to receive the action, the sentence in passive voice is "the pie was eaten by me."