Gerunds are nouns formed by adding -ing to a verb, such as running. Infinitives are nouns formed from the “to” form of a verb, such as to run. These two noun forms are called verbals, because they are formed from verbs. Experience with English will teach you which form to use in which situation. In the meantime, the following lists provide a brief overview.
See Chapter 20 "Grammar", Section 20.1.7 "Deciding If Relative Pronouns Take a Singular or Plural Verb" for more information regarding gerunds and infinitives.