Gerunds and infinitives are verb forms that can function as nouns. Gerunds are verbs ending in "-ing" and infinitives are "to + verb". Gerunds can be subjects of sentences, objects of prepositions, or objects of certain verbs. Infinitives can be objects of verbs or follow certain adjectives and nouns. Knowing when to use gerunds or infinitives depends on the grammar rules of the specific verbs in the sentence. The document provides examples of how to use gerunds and infinitives correctly in different contexts.