This looks exactly the same as a present participle, and for this reason it is now common to call both forms 'the -ing form' . However it 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:

as the subject of the sentence:

as the complement of the verb 'to be' :

after prepositions. The gerund must be used when a verb comes after a preposition:

This is also true of certain expressions ending in a preposition, e.g. in spite of, there's no point in..:

after a number of 'phrasal verbs' which are composed of a verb + preposition/adverb

Example:
to look forward to, to give up, to be for/against, to take to, to put off, to keep on:

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:

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:

in compound nouns
Example:

It is clear that the meaning is that of a noun, not of a continuous verb.

Example:

after the expressions:

can't help, can't stand, it's no use/good, and the adjective worth: