Programs need a contract
Your mobile app shows a profile: name, avatar, the last three posts and a follower count. The data lives on your servers, so the app has to ask for it.
An API is the agreed way to ask: which addresses exist, what to send, and what comes back. Here it’s JSON over HTTPS.
Key idea
An API is a promise. Once apps depend on it, changing it without breaking them is a real design problem.