API stands for Application Programming Interface.
API work like a delivery guy to serve data from the backend to the frontend of an application.
You can also think of it as a service provided by one application to another.
Most of the time you saw the use of API while login in using FB or login into Google.
WhatsApp, discord, Spotify, google products everyone has their APIs through which you can integrate their service or expertise inside your application without having to know any background details.
All the data of the user is provided by Google or FB to 3rd party application at the time to authenticating the user.
In the use case of API, 3rd party applications don't focus on how data is coming at their side but they mostly focus on what data is served by API and how to use it.
Suppose there is an API that serves you the weather, temperature, and other useful stuff, using it you can create an application that will help the users to see the weather in their city or some other application that gives some useful suggestions according to the gained data.
This way you can create so many different applications which extract or collect this information through some API and produce something new and useful for end-user.
APIs are great and all the big companies provide different APIs for developers to add something meaningful inside their application.