What's the role of the word *flaying* in both sentences and *drones* in the latter, please?

*Troy enjoys flying.  
Losi's hobby is flying drones.*

And how to differentiate between a gerund and a complement in sentences?