API means: application programming interface. But what does that mean?
lets break it down. We have API, which implies that we have different kind of interfaces. There is CLI (command line interface) and GUI (graphical user interface). Anything you do at your phone or computer uses a GUI. The browser you currently use to read my answer is a GUI application.
Lets take facebook and/or twitter as example. These companies sit on a massive amount of data (lets call them posts). Wouldn’t it be nice that if we are building our website, we could display posts/tweets on our website? Which is why FB and twitter made API’s, so we can retrieve data from there server, to display on our website 
When building our own website, we don’t have to build an API. Back-end programming languages (golang, java, C#, php, ruby, python) are capable of returning views with data which can be rendered in the browser
there are even tools to wrap the websites and publish them as app in the app store.
So we still haven’t build an API. We would start needing an API when our website would be a SPA (with reactJS or vueJS for example), or we build native apps (swift for IOS and Java or kotin for android)
If we start using an API, our back-end is only sending out data, which then needs to be handled in the front-end (by your SPA or native apps). This process of development is longer and most costly.