When is the ing form of a verb a noun and an adjective? I'm confused. Can anyone summarize it? What are the components of the sentence?

When is the ing form of a verb a noun and an adjective? I'm confused. Can anyone summarize it? What are the components of the sentence?

When the verb ing is used as the subject and object, it is used as a noun and is called a gerund happy.ING I like cooking. I like cooking. I like cooking. I like cooking. I like cooking. I like cooking. I like cooking. I like cooking