Merge API interview question

Explain how an API works.