What is an API and How Does it Work?