Here's a guide on chaining in Pokemon X and Y!
1. Buy a LOT of Super/Max Repels. Like at least 99 of them.
2. Go to a grass patch that is sufficiently large, probably at least 40-50 patches squared (so like 4x10 or 5x10) and use a Repel. A good place to practice is probably the Pokemon Village, because the grass patches are so huge. Note, though, that you can exit the Pokeradar's range if you stray to far from where you started chaining, and you'll have to start over. Anyway, step 1 is to use a Repel, turn on the Pokeradar, and encounter a Pokemon in a shaking patch. If it's not the Pokemon you want, reset the Radar by walking 50 steps and trying again. Do this until you get the Pokemon you want.
3. You must defeat or catch the Pokemon. After the battle ends, the grass patches will automatically shake. This is where it gets tricky - you must pay VERY close attention to the grass patches - where they are, how fast they're shaking, how loud they are, and whether or not they are next to other grass patches.
There are four types of shaking patches:
SLOW: Most of the time has NO Pokemon in it, and will break your chain. If it does have a Pokemon, it is almost always not the one you are chaining and will break your chain
NORMAL: From what I can tell, has about a 50/50 chance of having the Pokemon you are chaining vs a different Pokemon. Not safe to step in.
FAST AND LOUD: Almost always has the Pokemon you are chaining
SHINY: Hooray! You found a shiny patch! Will always have a shiny Pokemon in it!
However, fast and loud grass patches are not always safe to step in. Here is how you tell which patches to step in and which ones to avoid:
SAFE GRASS PATCHES:
1. Must be shaking fast and loud
2. Must be at least 4 steps from you
3. Must NOT be on the edge of the field
4. Must be by themselves (i.e., not next to any other shaking grass patches or you)
Shiny grass patches are also always safe.
UNSAFE GRASS PATCHES
1. Anything that shakes slow or normal
2. ANY grass patch, even fast and loud ones, on the edge of a field
3. ANY grass patch, even fast and loud ones, that are next to another shaking grass patch
4. ANY grass patch that is next to you
If there aren't any grass patches that match the criteria I listed for safe ones, then walk 50 steps (without entering any shaking grass patches, obviously) and reset the Radar to make different patches shake. This will not break your chain. Also, keep in mind that even if you follow the "safe grass patch" rules, there is still a slim chance that you could encounter a different Pokemon than the one you are chaining in a "safe" grass patch. It's rare, but it does happen. Following these rules, though, will greatly minimize the chance of breaking your chain.
THINGS THAT WILL BREAK YOUR CHAIN:
1. Using the roller skates or Bicycle
2. Entering a grass patch with a Pokemon different than the one you are chaining
3. Entering a grass patch with no Pokemon (these grass patches will always be slow-shaking)
4. Leaving the PokeRadar's range
5. Having an Egg in your party that hatches while you are chaining
THINGS THAT WILL NOT BREAK YOUR CHAIN:
1. Accidentally stepping in a slow/normal grass patch that miraculously has the Pokemon you are chaining. Lucky you!
2. Using the menus to switch Pokemon, use items, etc.
3. Encountering one of the legendary birds
4. Walking 50 steps and resetting the Radar
You will know if your chain is broken if the Pokeradar music stops and goes back to the normal Route music.
----
Lastly, sometimes, the Pokeradar music will change into something more upbeat. No one has any proof of what this does yet, but the general consensus on the Internet that I can find is that while the upbeat music is playing, you have a higher chance of encountering shiny patches. When the upbeat music starts, DON'T WALK INTO ANY SHAKING PATCHES. Keep walking 50 steps and resetting the Radar to see if you get any shiny patches. You can resume encountering and building your chain once the music stops.
Once you hit a chain of 40, stop encountering in the shaking grass patches. You can't get your shiny chance any higher after 40, so encountering will just risk breaking your chain. Once you hit a chain of 40, just keep walking 50 steps and resetting the Radar until you find a shiny patch. The chance of finding a shiny patch at a chain of 40 in D/P/Pt was 1/200. We don't know what it is in XY - it's at least 1/200 - but I'd put money on it being 1/100. Anyway, the chance of finding a shiny patch is still small - either .5% or 1% - but that's a lot higher than the normal .0001%, and with a lot of Repels and patience, you can still find a shiny patch fairly easily.