In the sentence "His hobby is writing poetry," the phrase "writing poetry" is a gerund phrase. A gerund phrase is verb+ ing which functions as a noun. In the sentence, the phrase "writing poetry" is a noun acting as a complement of the subject.
His hobby = writing poetry. This means "writing poetry" complements the subject "His hobby".