Gerunds are ING forms used as a noun.
We can use them as the subject of the sentence
Drunk -driving is illegal.
Driving too fast is dangerous.
Walking is good for you.
We can use it as object
I like cooking.
He enjoys walking.
They hate milking cows.
When we use the ING form to connect two clauses in a sentence, it is called PRESENT PARTICIPLE. The actions in the two clauses need to happen at the same time and the main clause and the participial clause need to have the same subject:
Dropping the gun, she put her hands in the air. = She dropped the gun and put her hands in the air.
Putting on his coat, he left the house. = He put on his coat and left the house.