Dangling gerund: By studying so hard, we missed the six o'clock news.
A gerund is a verb ending in -ing that is used as a noun. Studying is the object of the preposition by. Only nouns or pronouns can be used as objects of the preposition. The problem in the original sentence is that the subject, the news, is not what was studying. Whoever was studying is missing - this creates the dangling part of the dangling gerund. In the corrected sentence, we is the subject of both the main verb, missed, and the gerund, studying.