Gerunds can be used in various ways, such as the subject of a sentence, the object of a verb, or the object of a preposition.
Here are some examples to illustrate.
As the subject of a sentence
Swimming is a good workout.
Reading improves your vocabulary.
As the object of a verb
She enjoys running in the morning.
They appreciate learning new things.
As the object of a preposition
He is interested in painting.
They talked about traveling to Europe.
In each of these examples, the gerund (swimming, reading, running, learning, painting, traveling) acts as a noun, despite being derived from a verb.