Let's first of all understand what an API is. The term API stands for Application Programming Interface, which basically refers to an interface that different programs use in order to communicate with each other; in short, to send & receive data. APIs are like the fictional cars, which can carry the same passengers (data) by different means- land, air and water. They know exactly what medium to use when commuting to different places (programs).
The use of the term API can slightly vary across different programming areas. A server-side API is just another web server; but in place of a web page, it serves a certain piece of data when we make a request to its server. For example, if you visit this endpoint of TheCatApi, you shall receive an object that consists of a URL for some random cat's image, along with other data. We can utilize this API in a project to get random cat images. Such APIs play a crucial role in apps like weather, music, shopping, news, etc., because they provide data that these apps can utilize.