"To be [verb]ing" is only one part of the grammar. In the [verb]ing form, which we call a present participle, you can also use [verb]ing as an adjective (eg. a cutting board), or at the beginning of a clause, (eg. scientists researching exotic diseases).
Also, if you add "ing" to a verb, it can also become a gerund. These look exactly the same as present participles, but they work in a completely different way, ie. as nouns.
No simple, single rule here.