The most common ways are:
Check to see where it was caught. If this seems awry, then its probably a hacked Pokemon. To double check which Pokemon are found where, Serebii.net has a tool which shows all of the Pokemon worlds in detail.
Check its level: If a certain Pokemon was met at a level higher/lower than it should be (such as a Palkia/Dialga met at a level that is NOT 47), then its hacked.
Go to Smogon.com, and check the Pokemon out there. It will list what the maximums/minimums can be at level 100, which is very handy if you also have an IV calc/natures matchup chart.
Other than that, its just common sense, ie moves not normally learned, stats CLEARLY wrong (ie 999) and LV 100 Shiny Pokerus Master Ball holding etc. are also generally the creation of hackers.
Hope I helped!!