HubSpot Interview Question

How does an API work?