Hacking is using any external device to do something that otherwise wouldn't have happened in your game.
If I hacked to get a wonder card, it's indistinguishable from receiving it at the event. If I hack to get Shayin in Diamond, it's obviously hacked because the item was never released. That's why the term "legal" exists. It accounts for anything that looks legit, but you don't know the origin of it (IE you didn't raise it/capture it yourself). For better or for worse, a proper hack is indistinguishable from using legit game mechanics and events, so the best way to identify a hack is when it falls outside of legal parameters (illegal move set, improper Pal-PArk info, etc..)