A preposition is a word that tells you how words are related in a sentence. It could often follow a verb, but it does not always. The example of the frog and a log can tell you a lot of them, but those are only one of two categories of prepositions.
Prepositional Phrase List with BY