you can break it down like this:
the motor should alway be the limiting factor, every part that follows in the line should be able to deliver more Ampere.
Example:
If your motor draws max. 10A you should get an ESC that delivers AT LEAST the same amount of Ampere. usually you add 10-25% to be sure, since you can't trust the specs of the manufactureres.
So you go with a 12A ESC (or even a 15A ESC these small ones are cheap and lightweight so why not add 50% to be sure)
So your battery should be able to provide at least 12A CONTINOUSLY.
so you get a 1000mAh Battery with at least 12C (here again to be sure, add some Amperes to be sure. so go with 20C or even 25C - you might want to use it in another plane with a stronger motor Combo. also when your ESC burns out, your plane crashes and you might need some glue. if your LiPo goes up in Flame you just can watch your plane burn)
the C rating tells you how much of it's cacpacity a battery can deliver. 1000mAh = 1Ah * 20C = 20A so a 1000mAh 20C battery is more than enough for a 12A ESC
short example:
Motor needs 10A, ESC could deliver 12A, Battery could deliver 20A = Your Plane and you are happy
Background:
(very roughly broken down)
The ESC regulates the volts that go into the Motor to tell him how fast to spin.
The motor draws the amount of A that he needs for that (depends on differnent factors, such like resistance coming from prop etc.)
Motor doesn't care what the ESC has to say about that.
ESC has to be able to deliver that much A or more (just delivers as much as motor asks for) or it goes bye-bye from overheating.
ESC draws that much Amps from Battery
ESC doesn't care what the Battery has to say about that.
Battery has to be able to deliver that much A or more (just delivers as much as ESC asks for) or it brings down your plane in a ball of fire.
hope that helps