Gerunds and participles

We can use –ing forms not only as verbs, but also like adjectives, adverbs or nouns.

You are talking too much. (Here the –ing form talking is part of the present continuous verb.)
A rolling stone gathers no moss. (Here the –ing form rolling acts as an adjective describing the noun stone)
She walked out of the room talking on her phone. (Similar to an adverb)
Smoking is injurious to health. (Subject of the sentence)

When –ing forms are used as verbs, adjectives or adverbs, they are often called present participles.

When they are used more like nouns they are called gerunds.

The distinction between gerunds and participles is not very simple, and some grammarians prefer to avoid using the terms altogether. Instead, the expression –ing form is used.

The –ing forms have perfect, passive and negative forms

Having worked for twelve hours, I felt awful. (Perfect)
She loves being looked at. (Passive)
Not knowing what to do, I went home. (Negative)

-ing forms used as modifiers

-ing forms can be used as modifiers before nouns. Both participles and gerunds can be used to modify nouns. Examples are:

A waiting room (A room used for waiting)
A rolling stone
A sleeping pill
Working conditions

-ing forms can be combined with other words into clause-like structures.

She went running out of the room.
Who is the fat woman sitting next to James?
Smoking cigarettes is bad for health.