Amazon interview question

How does a web service work?