Gerunds and infinitives can both be used as subjects or objects in sentences. Gerunds refer to real or completed actions, like "I stopped smoking" where the smoking happened. Infinitives refer to unreal, abstract, or future actions, like "I stopped to smoke" where the smoking had not occurred yet. Both gerunds and infinitives can be subjects or objects of verbs. However, only gerunds can be objects of prepositions, such as "We are talking about writing in English."