An API (application programming interface) is a list of things something allows you to do when interacting with it.
The buttons on a vending machine are a physical form on an API. They dictate what you can and can't do with the machine.
APIs are used to integrate a website with an external website or software. This could be to feed enquiries taken through a website into a CRM like Salesforce, or passing an order status to a website from a stock/order management app.