Trying to grasp shiny chaining was a pain for me, since there are a lot of things that can break your chain.
When chaining for shinies, you need to be able to differentiate between patches of shaking grass. Some grass just shakes differently, and it takes some time to figure out the nuances. Once you go into a shaking patch of grass, all subsequent patches MUST be shaking in the same way.
You also cannot walk out of your grid/ quadrant (see Smogon's guide below), otherwise the chain will be broken.
You can't switch off your DS. If you do, the chain is lost and you need to restart. Best way to take a break is just to charge your DS w/o switching it off. Also, don't get on your bike either. That breaks the chain.
Also, DO NOT walk into the patch of grass directly above you. Your player sprite's head (Dawn/ Lucas) will block your view of the patch of grass directly above you, therefore making you unable to see if it's shaking. If you walk into it and it's not the same type of grass you wanted, then your chain will be broken.
There's a whole lot of pedantic things that will break your chain, so look at the guides below for more eloquent explanations than I can manage:
Smogon's guide on Shiny Chaining
There's also this video which will demonstrate shiny chaining, and also this guide, which will cover the same things but in text.