What is an API? How does it work?