Pergunta de entrevista da empresa Apple

What is a API and how does it work?