Hi KatieNgoc,
API are not library files. It is a service.
DLL are the library files.
API does not have user interface.
APIs are developed to consume by a client application.
Example
When you use an application on your device, the application connects to the Internet and sends data to server. The server then retrieve that data and performs some action and sends it back to device.
The application then presents you with the information you wanted in a readable way. This is what an API is.
For more details refer below link.
What is an API