An Application Programming interface (API) is a set of programming instructions and routines. It can be seen as an interface implemented and publicly provided by an application that allows other applications to communicate with it. A company provides APIs of its product to the public so that other developers can use those APIs to develop software that communicate with the company’s product.
An API is a software to software interface and not a user interface. By using APIs applications can communicate with each other without the user knowing or realizing anything about this communication taking place in the background.
When you use a third party application on your smartphone that promises to let you update your Facebook status, browse through your friend list, upload a photo and other stuff like that, you are actually making use of APIs provided by Facebook and used by the developer of the third party application. The application communicates to Facebook via these APIs without you noticing that.