Following a preposition (gerund only)
Gerunds can follow a preposition; infinitives cannot.
Can you touch your toes without bending your knees?
He was fined for driving over the speed limit.
She got the money by selling the car.
A corkscrew is a tool for taking corks out of bottles.
Note: Take care not to confuse the preposition "to" with an infinitive form, or with an auxiliary form such as have to, used to, going to
He went back to writing his paper.[PREPOSITION + GERUND]I used to live in Mexico.[AUXILIARY + VERB]I want to go home.[VERB + INFINITIVE]Following an indirect object (infinitive only)
Some verbs are followed by a pronoun or noun referring to a person, and then an infinitive. Gerunds cannot be used in this position.