This looks exactly the same as a present participle, and for this reason it is now common to call both forms 'the -ing form'. Howeverit is useful to understand the difference between the two. The gerund always has the same function as a noun (although it looks like a verb), so it can be used:
a. as the subject of the sentence:
- Eating people is wrong.
- Hunting tigers is dangerous.
- Flying makes me nervous.
b. as the complement of the verb 'to be':
- One of his duties is attending meetings.
- The hardest thing about learning English is understanding the gerund.
- One of life's pleasures is having breakfast in bed.
c. after prepositions. The gerund must be used when a verb comes after a preposition:
- Can you sneeze without opening your mouth?
- She is good at painting.
- They're keen on windsurfing.
- She avoided him by walking on the opposite side of the road.
- We arrived in Madrid after driving all night.
- My father decided against postponing his trip to Hungary.
This is also true of certain expressions ending in a preposition, e.g. in spite of, there's no point in..:
- There's no point in waiting.
- In spite of missing the train, we arrived on time.
d. after a number of 'phrasal verbs' which are composed of a verb + preposition/adverb
to look forward to, to give up, to be for/against, to take to, to put off, to keep on:
- I look forward to hearing from you soon. (at the end of a letter)
- When are you going to give up smoking?
- She always puts off going to the dentist.
- He kept on asking for money.
NOTE: There are some phrasal verbs and other expressions that include the word 'to' as a preposition, not as part of a to-infinitive: - to look forward to, to take to, to be accustomed to, to be used to. It is important to recognise that 'to' is a preposition in these cases, as it must be followed by a gerund:
- We are looking forward to seeing you.
- I am used to waiting for buses.
- She didn't really take to studying English.
It is possible to check whether 'to’ is a preposition or part of a to-infinitive: if you can put a noun or the pronoun 'it' after it, then it is a preposition and must be followed by a gerund:
- I am accustomed to it (the cold).
- I am accustomed to being cold.
e. in compound nouns
- a driving lesson, a swimming pool, bird-watching, train-spotting
It is clear that the meaning is that of a noun, not of a continuous verb.
- the pool is not swimming, it is a pool for swimming in.
f. after the expressions:
can't help, can't stand, it's no use/good, and the adjective worth:
- She couldn't help falling in love with him.
- I can't stand being stuck in traffic jams.
- It's no use/good trying to escape.
- It might be worth phoning the station to check the time of the train.