He's good at swimming. Ali quit smoking in 1977. He just decided to quit one day. In both the examples above, the gerund and the infinitive are the objects of the verbs in the sentence. However, as noun substitutes, gerunds and infinitives can also be the subject of a sentence.
Smoking is hard habit to give up.
To quit takes a lot of will power. The teacher considered calling the police. Misty said she was so embarrassed that she felt like dying . The teacher finally said she would recommend giving Jeannie a light punishment. Some verbs are always followed by infinitives.