Pergunta de entrevista da empresa Sage

What is an API, and how do you implement it in code?