First, we need to know what is a Gerund and what is an Infinitive, for it:
- Gerund: It is a verb + "ing", it is not the "ing" verb form used in the continuous tenses. They look exactly the same; however, they are not.
- A gerund is formed by adding "ing" to the verb, those verb forms are used as a noun in a sentence.
- They can be the subject in a sentence: "Reading books is my favorite hobby"
- As the object in a sentence: "He enjoys sleeping on the sofa"
- As the complement of the subject: "Her previous job was teaching English"
- As the object of a preposition: "Hillary is good at writing essays."
- After some verbs such as: "like, love, hate, enjoy, avoid, bear, consider, deny, detest, dislike, endure, imagine, involve, mention, mind, miss, practice, risk..."
- Infinitive: This is the verb form that has "to" at the beginning and then the base form of a verb. For example: "to do", "to sleep"...
- They can be the subject in a sentence: "To learn English is my purpose"
- Work as the object in a sentence: "Sophia refused to be given money"
- As the complement of the subject: "My dream is to work in a big company."
- As an adverb of purpose: "To understand more, please visit our page."
- After some verbs such as: "want, need, would, like, agree, appear, arrange, attempt, need, hope, expect..."
- After questions words: what, who, where..."
- Infinitive to purpose, to say why we do or did something: "I bought the sugar to make a cake"
Here is a video, it has an explanation such amazing to be easily understood.
Also, some images with a list of verbs followed by Gerunds and Infinitives