Function
Some verbs are followed by an infinitive (to + verb), while others are followed by a gerund (verb + -ing). Some verbs — like love, like, hate, and prefer — can be followed by either with no change in meaning.
Love, Like, Hate, Prefer + infinitive or -ing
These verbs can be followed by either the infinitive or the gerund. Both are correct.
I hate eating alone. = I hate to eat alone.
We prefer to shop online. = We prefer shopping online.
She likes eating out with friends. = She likes to eat out with friends.
Would prefer + infinitive
Would prefer is always followed by the infinitive (to + verb), not the gerund.
I'd prefer to travel by plane.
She'd prefer to do it herself.
Would like + infinitive
Would like is always followed by the infinitive (to + verb), not the gerund.
He'd like to see her again.
I'd like to thank you for your help.
We'd like to stay a little longer.
Would rather + base verb
Would rather is followed by the base verb (no to, no -ing).
I'd rather see an action film.
They'd rather know the truth.
⚠ Common mistakes:
✗ I'd like going to the cinema. → ✓ I'd like to go to the cinema. (would like + infinitive)
✗ She'd prefer staying home. → ✓ She'd prefer to stay home. (would prefer + infinitive)
✗ I'd rather to watch TV. → ✓ I'd rather watch TV. (would rather + base verb, no to)