There are many cases where they are interchangeable, to be sure. "I like to ski" and "I like skiing". But they are not the same. "I spent the afternoon skiing" is a perfectly good sentence. "I spent the afternoon to ski" is very much not.
"To ski" is the infinitive. It can still be infinitive without that to, such as in "do not laugh". That can be used as a noun reflecting the activity the verb refers to.
Another nonfinite form is the gerund, a form used mainly as a noun to reflect the activity the verb refers to. That is presented as the -ing form. In that usage, it may be interchangeable with the infinitive.
The third nonfinite form, or set of forms, is the participle. One of those is the progressive participle, sometimes called the present participle (notwithstanding the fact it can be used for past and future constructions), and reflects a verb whose process is (or was, or whatever) ongoing. That is used to form the present progressive ("is skiing"), among others. In that usage, it is not interchangeable with the infinitve.