This question gets asked on basically every trainer ever made. Including modded APK's. Here's everything you need to know.
How to get banned:
1. Bragging about your achievements that you obtained in a short amount of time.
2. A friend or someone that was suspicious about your profile activity reports you.
3. Being Blizzard's #1 Fan Girl when it comes to the Ticket system.
4. Being that guy that false reports people when you're mad, will put your account in suspicion.
5. Not restarting the game after you finished cheating. When you attempt to enter a MP based function, you'll be kicked and it'll log you for unauthorized 3rd party applications a.k.a. Cheat Engine.
6. Abusing the cheats.
How to not get banned:
1. Don't be an idgit.
2. Don't be an idiot.
3. What the first two said.
4. If you don't know what an idgit is, then you failed step 3.
Q. Will I get banned if I followed all the cheating rules, and avoided everything on the "How to get banned" section?
A. You won't.
Q. I got banned, and I followed everything you said! Why did I get banned?!?!
A. Then you clearly didn't follow everything I said.
Q. How long have you been cheating?
A. Literally as long as I can remember. Cheating is fun.
Q. Have you ever been caught cheating?
A. Yes, but they couldn't ban me due to lack of proof. I'm good at talking my way out of things. That Charisma stat be OP
If you have any questions then please ask.