If I use the option to use Ebay's shipping service, do I have to pay the shipping in advance or does it get taken out of the buyer's payment?

I have searched for the answer but I can't get a clear picture of how this works.