I prefer means “I like it better”. It is followed by a verb + -ing or a verb in the infinitive:
- I don’t like driving. I prefer using / I prefer to use public transport. (= In general I like it better.)
If we mean “just now”, we use I’d prefer to with a verb in the infinitive:
- I don’t want to drive into the town centre. I’d prefer to take the train. (= today)
Since “I’d prefer” is quite formal, in conversation, people often say I’d rather, which means the same:
- I don’t want to drive into the town centre. I’d rather take the train.
- Let’s take a taxi — or would you rather walk?
Notice that after rather, we use the infinitive.
There will, of course, be situations in which you don’t like doing something, or you wouldn’t like to do a particular thing. Perhaps you would prefer not to do it. In cases like these, you simply need to say:
- Thanks, but I’d rather not.