The ending "-ing" can also be used to nominalize verb phrases. For example, "to swim" is a verb, but "swimming" is a sport (noun). "To swim in the summer" is a verb phrase, but "swimming in the summer" is a noun phrase, that's why you can say "I like swimming in the summer."