An API works by communicating with and exchanging data with other systems, acting as a messenger between the user and the system to retrieve the necessary data the user is requesting from the system. 