Gerunds are created out of verbs, but they function as nouns. In other words, a gerund is a noun made by adding '-ing' at the end of a verb. Thus, the gerund 'walking' is formed form of the verb 'walk'. Gerunds can be used as the subject, the complement, or the object of a sentence. The gerunds and the present participles look alike, as both end with the letters ing. So, it should be kept in mind that, gerunds are words that are formed with verbs, but act as nouns, while present participles do not act as nouns. Present participles act as modifiers or complete progressive verbs. Examples of gerund – Swimming are a good exercise / I really enjoy reading / Sushma always keeps smiling / Playing video games do not help to burn calories.
The gerunds must be used when a verb comes after a preposition. Examples – Ratna avoided Rajesh by walking on the opposite direction. Phrasal verbs, that include the word "to" as a preposition, should also be followed by a gerund. Example – I look forward to hearing from you / He is used to it.
Both gerunds and infinitives can have objects, though they function as nouns and retain their verb meanings. That means, it is not uncommon to see a sentence with two or more objects when gerunds or infinitives are in play. For example, let us take a sentence – I enjoy studying English. Here, 'studying' is the direct object of 'enjoy' and 'English' is the direct object of 'studying'. For another example, we take - My teacher asked me to help Jharna in her studies. In this sentence, 'me' and 'to help' are the direct objects of 'asked', while 'her' is the direct object of 'to help'.
Strangely enough, very often we use gerunds in our everyday language and gerunds can function as subjects, direct objects, indirect objects, objects of prepositions, and predicate nouns.