Lots of practice and wave management. You'll find that as you progress if you pay attention to the way your minions aggro the other minions and learn their patterns it will become a LOT easier. Last hitting minions where they are each hitting 1 target is fairly easy, last hitting as a champion with very little AD when 13 of them are focusing 1 target becomes incredibly difficult. This is compounded by your opponent who will inevitably attempt to deny you and harass you when you go for the obvious CS.
Try not to use your abilities unless they have the potential to 1-shot the minions or cleaning up something far out of your auto-attack range. Viktor is a prime example of this, as with a single upgrade to his Hextech Core and a small amount of AP, he's easily able to 1-shot the entire minion wave (save for cannons). Morgana usually fairs decently well in regard to this also with a few points in her Tormented Soil (W), however the way it "ticks" can really screw up your CS'ing if your minions decide to take a whack at the enemy minions with little HP left. This is made worse by having a slow AA speed as well as AA travel time, and if your W doesn't kill the casters it will often leave them with very little HP, making it a "race" to last hit them before your minions do.
Runes and Masteries tend to make it a bit easier for you to CS, however very rarely will you be able to achieve a perfect CS score without your opponent stepping in - aside from the occasional top laners that essentially have an agreement to trade minions waves with one another (think hyper-tanks with wet noodle damage to one another) as it tends to get boring for Nautilus and Maokai to smack one another for 5 minutes dealing negative damage while denying themselves minions.
Here's 2 helpful sites that can give you an idea of how your CS'ing is doing:
http://mullinator.com/tools/cscore
http://www.leagueoflegendsmath.com/Articles/Minion_Math.html