Cubic interview question

What’s an API and how does it work.