Apple interview question

What is a API and how does it work?