An application programming interface (API) is a way for two or more computer programs or components to communicate with each other. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how to build or use such a connection or interface is called an API specification. A computer system that meets this standard is said to implement or expose an API. The term API may refer either to the specification or to the implementation. Whereas a system's user interface dictates how its end-users interact with the system in question, its API dictates how to write code that takes advantage of that system's capabilities.
Although the people who coined the term API were implementing software on a Univac 1108, the goal of their API was to make hardware independent programs possible.
A computer program is a sequence or set of instructions in a programming language for a computer to execute. It is one component of software, which also includes documentation and other intangible components.
Lovelace's description from Note G
Glenn A. Beck changing a tube in ENIAC
Switches for manual input on a Data General Nova 3, manufactured in the mid-1970s
A VLSI integrated-circuit die