Learning how to use gerunds or infinitives in English may seem a bit tricky at first. It takes some time to learn the correct patterns so it is a good idea to play the video below and then click on the exercises.
Gerund or Infinitive- Easy Level
Gerund or Infinitive- Medium Level
Gerund or Infinitive- Advanced level
Finally, I also recommend you to click on the following video. It contains lots of examples taken from famous songs.