How can I distinguish between words which have the -ing in a sentence that are nouns, verbs, or adjectives?
There is no general rule up and above what you do normally for any non-verb word.
-ing words are never standalone verbs - the closest they get is being part of an expression of continuous tense - I am walking to the store. Even here, technically it's probably an adverb, since it modifies be.
BUT -ing words do take objects. So they are not verbs per se but verbals.
Adjectives in English immediately precede nouns, and will come after articles. -ing words that follow this pattern are adjectives.
Nouns or noun phrases in English can function as a sentence's subject or object. The subject will come before the verb, objects will come right after the verb. If a sentence with an -ing word is "missing" a subject or object, the -ing word is probably the noun functioning as either one of those.
Running took a lot out of me.
What's the subject of "took"? There's no other choice but running here, so that's it.
Similarly:
The arduous running sapped his energy
Now:
Kicking him didn't wake him up
Kicking cannot be the verb of this sentence, even though it might look like it - especially since it has an object. Him can't be the subject because it's an object pronoun. So the only thing left here is for kicking to be the subject (noun) of wake here.
Can -ing words be objects? They can, but I think they cease to be verbals at that point, and are really full fledged nouns.
I gave him a talking.
Why is this a noun and not a verbal? Because you can pluralize it like a noun - and that's probably your main clue.
I gave him three talkings.
As far as why it stops being a verbal - well, like a verbal, you can't really fit an object in there:
I struck the ball with my bat.
There were three strikings the ball with my bat.
a preposition is really needed, splitting it away from the verb:
There were three strikings of the ball with my bat.
and that still sounds horrible.