Pokemon-Amie is perhaps my favourite new feature in Pokemon X and Y, as it creates a visible bond between you and your Pokemon that hasn't been apparent in any other game in the series. Reaching the maximum level of Affection in Pokemon-Amie is no small task, though, so here's how to do it.
There are three stats you can raise in Pokemon-Amie: Affection, Fullness and Enjoyment. Affection is the most important, though it can only be raised by working on the other two. To raise Affection, you must play mini-games with your Pokemon and also feed it Poke Puffs, which are essentially cupcakes you win by completing those mini-games. You must also pet your Pokemon, essentially making it a Tamagotchi for the Facebook generation.
Start off by petting your Pokemon by rubbing it with your stylus. Each Pokemon has a place on its body where it enjoys being rubbed the most, which you can judge by the expression on its face. Keep rubbing it in that place until hearts appear around its head. Repeat this process until those hearts are replaced by a musical note, which means that your Pokemon wants to play a mini-game.
There are three mini-games, but Head It is by far the easiest and will award you the best Poke Puffs. After playing a round of Head It, go back and feed your Pokemon the Poke Puffs you acquired (the best ones will be found by scrolling to the far right of your inventory). Do this until it refuses to eat any more, and then go back to rubbing it again. Repeat this process until your Pokemon starts dancing - this means that it has gained one Affection point.
Do this five times and your Pokemon will have full Affection, meaning it will be more likely to avoid enemy attacks and will have more chance of landing Critical Hits in battle. This Affection will not decrease over time, so you needn't worry about maintaining it.