A gerund is a correct answer to this question. First, the verb in this sentence must be identified. In this sentence, the verb is swimming. Being that the word ends in "ing," this verb can be defined as a gerund. Gerunds are verbs that end in "ing" and have a connection with the subject.
Other words that are gerunds are watching, eating, teaching, brushing, and running. They can act as a noun or object. In sentences, gerunds can also complement the noun. An example would be "The teacher's goal is teaching the children." The word teaching completes the goal of the teacher.