I give you three example sentences, this way it would be easier to understand.
我吃了一个苹果。
我把一个苹果吃了。
一个苹果被我吃了。
You will find all the three sentences are explaining the same thing, in other words they are same in meaning.The first sentence is a normal order, while the other two sentences are not , because they used " ba" and “bei". When you use "ba", you should place the object in front of the verb. When you use "bei", the sentence will be turned into passive voice. An apple was eaten by me.
Get it?