Gerunds are formed with -ing and can be used as subjects or objects of verbs or prepositions. Infinitives are formed with "to" and can be used as subjects or objects of verbs. While both can be subjects and objects of verbs, only gerunds can be objects of prepositions. Gerunds are used to describe real or completed actions, while infinitives describe unreal, abstract, or future actions.