Since the gerund acts as a noun it can:
1. be the object or the subject of a sentence: I like cycling
2. follow prepositions: She insisted on staying here
Here you have to be careful with preposition to. Sometimes it is a preposition and takes the gerund but sometimes it is part of the infinitive:
I used to smoke
I am used to smoking
3. take the article
4. be replaced by a noun
The present participle is by contrast descriptive. It can:
1. be used as an adjective: running water
2. be used instead of relative pronouns I saw a man wearing a coat.
3. come after certain verbs like see, spend: I spent an hour working.
These two ing-forms are better understood in comparison with the infinitive:
1. Infinitive vs. gerund (prospective vs. retrospective view). See my explanations on this matter elsewhere or the articles in the member area.
I like cycling (gerund implies enjoyment). The verb "enjoy" takes the gerund as well.
I like to cycle. (infinitive: implies choices)
I don't like going to the dentist (I go although I don't like)
I don't like to go to the dentist. (I don't go)
2. Infinitive vs. present participle
I saw him repair the car. (bare infinitive: I saw the complete action)
I saw him repairing the car. (present participle: not clear whether I saw a fraction of the action or all of it.)
- For Teachers