An API is just an interface program or script (PHP is very common) that tells different software programs how they should interact with each other in order to accomplish certain tasks.
For example, one of my clients has a custom PHP/MySQL program/DB that add/tracks memberships and writes insurance policies, but uses Shopsite for its shopping cart system. Shopsite was already in place on the client's server before the custom program was written, and the client didn't want to change it as it was selling other merchandise at the time, and was easily maintained by staff.
We didn't have access to the Shopsite source code to make changes, but the 2 programs needed to interact with each other in order to pass the policy information to the cart system for final payment, and back to the membership/policy program for policy activation and new member entry (you need to be a member to buy the insurance policies).
Shopsite, like many programs, does have an API function, and we were able to write a custom API script that allowed the membership/policy program to interface with the cart system so that it passes the information between the two programs.
Just think of an API as an instruction program that tells each program what to do and how to do it so that the programs can work with each other to get what you require. There's not much more to it than that; API's can be simple (just a few lines of code) or extremely complex depending on the task, but their basic function is pretty simple.