If you are talking about an activity which you enjoy, such as 'I like playing guitar' or 'I like to play guitar', you can use either of these constructions, and the meaning is exactly the same. Generally, speakers of American English prefer the infinitive, while British English speakers use the gerund, but there is no difference at all in meaning. Personally, I would always the gerund in this context, but I've become accustomed to hearing the infinitive form more and more as global English becomes steadily more Americanised.
However, in other situations there is a clear difference. If you say 'I like doing this', it means that the activity is enjoyable for you. But take a look at these sentences:
'I like to have full insurance cover whenever I go on holiday.'
'I like to have one day a week when I just drink green tea and miso soup.'
'I like to see my dentist once every four months.'
Obviously, you don't find these activities enjoyable in themselves -nobody actually enjoys paying insurance premiums, going without food or having a dental checkup. In each of these cases, we use the construction 'I like to do', not because the activity is pleasurable, but because it is a good thing to do - for financial, health or other reasons. You would not use a gerund in these situations.
Now, here's my question, specifically for US English speakers:
Would I be right in thinking that you use the infinitive in the same way as GB English for the 'I like to see my dentist'-type situations, but that you also use the same construction for activities which you actually enjoy, as in 'I like to cook'? And that 'I like to cook' has exactly the same meaning for you as 'I like cooking'? Or is there a subtle difference for you?