'Hearing the sound, they came out of the house'. In this sentence what is the part of speech of 'hearing'. In my opinion it is present participle but my book says it is gerund. Can anyone explain me how to differentiate between the two? All I know is that in "V1+ing + noun" format, it is a present participle if the noun is the doer of that action(e.g. running deer) otherwise not.
It is a participle. You can tell this because it qualifies (describes) "they", the subject of the verb. Being a participle, it is a kind of adjective: a verbal adjective. that is, it is an adjective formed from a verb base - in this case, hear.
Now in the following sentence, hearing is a so-called gerund.
Hearing the sound was the most significant thing I experienced all day.
In this case hearing functions as a noun: a verbal noun. You can tell this because hearing is the subject of the main verb is. It could be the object of a verb.
I hate hearing the sound.
It is not always that easy, these are the simplest way to explain the difference between these two features.