Hi Lisa!
Of course, prepositions are used differently depending upon how you construct a sentence. There are rules of grammar to use as a guideline when deciding on the use of prepositions.
You always use a preposition to show the relationship of a noun or phrase to something. The subject and verb must occur before the preposition and it should be followed by a noun. Never follow a preposition with a verb.
Good luck with your learning goals!