This belongs in the simple questions thread it will be closed soon so......
Codes are used for cheating at most pokemon games.
There are thousands of cheats for anything you name it i.e getting shineys, masterballs, pokemon etc.
But you have to have a cheat system gameshark and many more brands to input the cheats onto. Which doesn't come with anything and usually is around £10 - £30 (UK).
But it can mess up your game putting in the cheats but that is a risk you must take if you want to cheat.
There are loads of websites which give you cheats like PC, Code junkeys and more.
Has that cleared things up for you.