Gerund (-ing) Clauses

E. When two things happen at the same time, we can use an ‘-ing’ clause. (e.g. Kate is in the Kitchen making coffee. (= she is in the kitchen and she is making coffee))
a. also use ‘-ing’ when one action happens during another action. We use ‘-ing’ for the longer action. (e.g. Joe hurt his knee playing football. (= while he was playing))
b. can also use ‘-ing’ after while or when. (e.g. Jim hurt his knee while playing football)

E1. When one action happens before another action, we use having (done) for the first action. (e.g. having found a hotel, we looked for somewhere to have dinner.)
a. can also say after ‘-ing’. (e.g. After finishing her work, she went home.)
b. If one short action follows another short action, you can use the simple ‘-ing’ form (doing instead of having done) for the first action. (e.g. Talking a key out of his pocket, he opened the door.)

E2. can use an ‘-ing’ clause to explain something, or to say why somebody does something. The ‘-ing’ clause usually comes at the beginning of the sentence. (e.g. feeling tired, I went to bed early. (= because I felt tired))

E3. Noun + ‘-ing’ clause: Some verbs are followed by a noun and an -ing clause:
a. verbs to do with the senses: see, watch, hear, smell, listen to, etc. (e.g. We saw everybody running away. Who is that man standing over there?)
b. other common verbs: catch, find, imagine, leave, prevent, stop (e.g. I caught someone trying to break into my house.)

more about the Gerund (-ing) and to ~ (infinitive)