1. Swimming is my hobby. 2. I like swimming. 3. He is swimming in the pool. In which of these sentences 'swimming' is a gerund an in which one/ones it is used as a participle?
In (1) and (2) 'swimming' is used as a noun. It can be replaced by another noun, or by 'it'.
In (3) it is obviously a form of 'to swim', made to denote a continuous action.
Conclusion: (1) and (2) gerund, (3) participle.
The word swimming is used as a gerund in the first two sentences and as a participle in the third.
When the participle form of a verb is used as a noun, it is called a gerund.
In both the first sentence and the second sentence, we could ask the question "What" and get the answer "Swimming", indicating it is used as a noun.
1. What is my hobby? Swimming.
2. What do I like? Swimming.
Another way to determine this is to replace the word swimming with "it" or "that" and see if the sentence still makes sense. If it does, the participle form is a gerund.
1. That (swimming) is my hobby.
2. I like it (swimming).
In the case of the third sentence, these tests do not apply; rather swimming is used along with the verb "is" as a compound verb in the present continuous tense.
3. He is swimming in the pool. (present continuous)