Words ending in -ing express actualized events. Either the speaker has experienced it or is doing it. to-infinitive verbs express unactualized events. Either the speaker hasn't experienced the event or has but is speaking of the event as a impersonal event, something general. For example,
I like to swim. (general event)
I like swimming. (I have experienced it).