What are APIs, and how do they work?