Gerunds are formed by adding ing to the verb base. However, they function as nouns rather than verbs.
Gerund as subject: Analyzing the data was fun.
Gerund as direct object: We contemplated analyzing the data.
Gerund as object of a prepositional phrase: By analyzing the data, we documented differences between the treatments.
Gerund vs present participle: Both end in ing but the present participle is an adjective rather than a noun. Analyzing the data, we documented differences between the treatments.
Gerund and present participle vs past participle: The past participle usually ends in ed and functions as an adjective. The analyzed data were convincing.