EvilMario said:Two ways.
One is I've played through every title (Fire Red, Emerald, Pokemon XD/Col, Pearl/Platinum, HGSS) many, many times.
Secondly, GTS. Usually it's a 'rare' Pokemon for a 'rare' Pokemon, but occasionally you can find people offering something like a Jirachi for a starter, an easier to obtain legendary Pokemon, etc.
I do tend to release any hacked Pokemon I come across though, so that hurts my numbers. Haha.
There is no way to tell if you have a clone though