No, whom doesn't always follow a preposition. We can use it also as a relative clause to link one clause to another, for ex:
The job was delivered to a man, whom many consider to be a hard worker.
whom is also used as an objective pronoun to replace the object of the sentence for ex:
The girl whom you met yesterday is my daughter.
Whom do you think is the best actor this year?