A gerund is a verb form that is used as a noun, translated with the “-ing” form of that verb in English. It is distinguished in Latin by the present stem + -nd- + a 2nd declension neuter singular ending.
Note that the “-ing” form in English is also used for participles. Not every “-ing” verb in English will be a gerund.
The running man is moving very fast. > participle (currēns)
The man’s method of running is very efficient. > gerund (currendī)
This is a rare instance in Latin of a neuter accusative being distinct from its nominative: gerunds are never nominative in Latin. If your intended meaning would call for a gerund in the nominative case, use the present active infinitive (2nd principal part) instead.
“Making mistakes is human” > “To make mistakes is human” = “Errāre hūmānum est”
To form gerunds in 1st, 2nd, or 3rd conjugation, remove the -re from the present active infinitive and replace it with -nd- followed by -ī, -ō, or -um, depending on the case you need.
amō, amāre > amandī
habeō, habēre > habendī
agō, agere > agendī
To form gerunds in 3rd-io or 4th conjugation, remove the last three letters from the present active infinitive and replace them with -iend- followed by -ī, -ō, or -um, depending on the case you need.
faciō, facere > faciendī
veniō, venīre > veniendī
Irregular verbs have, understandably, unpredictable gerunds.
eō, īre > eundī
ferō, ferre > ferendī
sum, possum, volō, nōlō, mālō, and fīō do not have a gerund form.
The cases of the gerund tend to be more restricted in usage than cases for other nouns.
genitive (-ndī) is used to logically complement a noun or adjective.
studiōsus discendī = fond of learning; spēs fugiendī = hope of escaping; modus operandī = method of operating
dative (-ndō) is used for purpose (“for”).
Quaerō locum aedificandō = I seek a place for building
accusative (-ndum) is used after ad (translate “for”) for purpose.
Parātus sum ad pugnandum = I am ready for fighting
ablative (-ndō) is used for means or instrument (by, by means of)
Discimus legendō = We learn by reading