An Application Programming Interface (API) is an interface that you can send requests to, and it will give you a response. These are used to let other people control parts of your software, whether that is getting information from the API database, changing a user's settings, or getting the API to send a text.
They are a very powerful tool for developers, giving you access to more data and services than you could ever gather or build on your own.
External APIs don't have to be built by someone else. If you have a system that you want to access from the chatbot, you can add API access, or you might already have an API built for it. Using an API to separate sections of your code or company can be a good way to allow and improve modularization.