It's simples, really. You go out, run around in the water, grass, caves, EVERYWHERE, and if a Pokemon sees you and it's like "I love this person's style!" it'll change it's color so it attracts you, making you catch it! But there's only a 1/8192 chance that they'll like ur style..because most Pokemon are mean and just don't understand humans... SO YAA, that's err, how you catch a shiny..... But there are also ways to improve the chance of Pokemon being shiny (I was joking about them like your style...) You can use the Poke Radar, Masuda Method, etc. but you should read up on all that here
Sources: Common Pokemon sense, esperience, and Bulbapedia.