Shiny Pokemon are completely random. However, you can hunt for them. You can soft reset, random encounter, or hatch them.
There is a method in game called the Masuda Method. It is where you breed two Pokemon of different nationalities (Japanese Ditto and English Pikachu for example) and the chances of hatching a shiny are raised from 1/8192 to 1/1366 in Black and White (it's 1/2024 in D/P/Pt/HG/SS)