You can use an -ing clause in the following situations:
- When two things happen at the same time
Isabelle is in the kitchen making coffee = she is in the kitchen while making coffee
- When one action happens during another action. We use -ing for the longer action
Joe hurt his knee during football.
- When one action happens before another action. We then use having (done) for the first action
Having finished her work, she went home.
- To explain something, or to say why somebody does something
Feeling tired, I went to bed early = because I felt tired