gerund and the infinitive
The gerund and the infinitive are forms of the verbs that act as names. The gerund is formed with "-ing" (walking, eating, etc.) the infinitive is formed with the preposition "to" (to walk, to eat, etc.).
applications
gerund
1.-After some verbs: deny, avoid, can not help, like, dislike, enjoy, mind, keep on, suggest, finish etc.
2.-After a preposition (normally it is about verbs or adjectives with obligatory preposition):
examples
He finished doing his homework.
I’m interested in learning English. // I’m fond of playing tennis.
Smoking is dangerous for your health.
When the verb is the subject of the sentence
infinitive
After some verbs like: would like, agree, decide, choose, plan, refuse, hope, want, manage etc.
After adjectives
examples
I’m happy to see you again.
I want to become a teacher.
I’m here to study English. // I have come to help you
To express an objective or why we are doing an action: