Gerunds end in -ing and can function as subjects or objects. Infinitives use "to" and can be subjects, objects, or complements. Both can be subjects or objects, but only gerunds can be objects of prepositions. It can be difficult to know when to use each, but gerunds often refer to real actions while infinitives refer to unreal or future actions.