The key thing with stimming is to a) find out the reason behind it (a person doesn't stim because they want to, they do it because of a neurological imperative), and b) re-direct a harmful stim as opposed to stopping it. So say, for example, your kid is head banging. This obviously can't continue, so while you're trying to find the root cause you focus on harm reduction - padded headbands, pillows/cushions behind their head, etc.
In terms of investigating, oh jesus, just pick something and go from there. When are they doing this? Throughout the day? At bed time (very common)? When you ask them to do something in particular? Before eating? After eating? Before/during/after toileting? Just at school? Just at home? When they're told no? When they have to go outside/inside? When they have to be around people or a particular person? When they're happy/sad/angry? Around animals? Check their vision, their hearing, their digestion (head banging is VERY common in autistic kids with IBS, sensitive stomachs, celiac, etc). And on and on and on until you think you've got it. Then address the situation(s) in what ever manner you think is appropriate (avoiding that activity/place if possible, self soothing, modified learning, etc) and try to redirect the stim into a non-harmful activity if it continues to happen.
It's not easy. I would never pretend that it is. But to give your kid/student/patient their happiest, healthiest life - this is what you gotta do.