Gerund and infinitives come from verb forms but function as nouns.
A gerund or infinitive can be a direct object of a verb.
Gerund = an -ing form of a verb Infinitive = to + a base form
She enjoys paiting. He wants to paint the kitchen yellow.
Use a gerund after the following verbs: avoid, discuss, dislike, don´t mind, enjoy, feel like, practice, quit, suggest.
Use an infinitive after the following verbs: agree, be, sure, choose, decide, expect, hope, learn, need, plan, seem, want, wish, would like.
Other verbs can be followed by either a gerund or an infinitive; begin, can´t stand, continue, hate, like, love, prefer, star.
Gerunds as object of prepositions
A gerund (-ing form of a verb) can function as an object of a preposition.
preposition object
I´m afraid of flying.
She´s bored with cooking.
She objects to discussing her feelings.
Be careful! Don´t use an infinitive as the object of a preposition.
Don´t say: Let´s go to a movie instead