Without going into the details of the actual meaning of this name, all you really need to know in malware analysis is that APIs are those exported functions in any library that any application can call or interact with.
APIs can be exported from an .exe file as well as a library, and this program (.exe file) can run as a program, be loaded as a library, or called from other libraries loaded by the program while running.
Each program's import table contains names of all required libraries and all their APIs that this program uses. And in each library, the export table contains the API name, the API ordinal number, and the RVA address of this API in the library.
Each API has an ordinal number, but not all APIs have a name.