Sometimes we need to decide whether to use a verb in its:

to-infinitive  form - to do, to sing

or in its:

-ing form - doing, singing

For example, only one of the following sentences is correct:

  • I dislike to work late.
  • I dislike working late.

Which one?!

Use infinitive...

after adjectives, for example:

  • disappointed, glad, happy, pleased, relieved, sad, surprised

This includes "too + adjective" and "adjective + enough". Look at these example sentences:

  • I was happy  to help them.
  • She will be delighted  to see you.
  • The water was too cold  to swim in.
  • Is your coffee too hot  to drink?
  • He was strong enough  to lift it.
  • She is rich enough  to buy two.

after certain verbs, for example:

  • forget, help, learn, teach, train
  • choose, expect, hope, need, offer, want, would like
  • agree, encourage, pretend, promise
  • allow, can/can't afford, decide, manage, mean, refuse

Look at these example sentences:

  • forgot  to close the window.
  • Mary needs  to leave early.
  • Why are they encouraged  to learn English?
  • We  can't afford  to take a long holiday.

Use -ing...

when the word is the subject of a clause:

  • Swimming  is good exercise.
  • Doctors say that smoking  is bad for you.

after a preposition:

  • I look forward to meeting you.
  • They left without saying goodbye.

after certain verbs:

  • avoid, dislike, enjoy, finish, give up, mind/not mind, practise

Look at these example sentences:

  • dislike  getting up early.
  • Would you mind opening  the window?
Some verbs can be followed by the infinitive or -ing form without a big change in meaning: begin, continue, hate, intend, like, love, prefer, propose, start
  • It started to rain / It started raining
  • I like to play tennis / I like playing tennis

sources : Original Link