Interface
In short: A defined interface through which two systems or components communicate with each other — in a hardware context, a physical connector (e.g. a network interface, USB interface); in a software context, a programmatic interface (API).
In more detail: An interface defines HOW two sides talk to each other (connector shape, protocol, signal level, or function signature), without one side needing to know how the other is built internally. This enables interchangeability — as long as the interface is respected, the concrete implementation behind it doesn’t matter.
In Depth
The core principle of an interface is the separation of “what is offered” and “how it’s implemented internally” — an interface is basically a contract: as long as both sides stick to the agreed form (pin assignment and signal levels for hardware, function names and parameter types for software), it doesn’t matter how the other side is built internally. This allows one side to be completely replaced without having to adapt the other — as long as the interface stays the same.
In a hardware context, this idea comes up constantly: USB as an interface lets mice, keyboards, external drives and countless other device types from a wide range of manufacturers all be connected to the same port, because they all adhere to the same electrical and logical specification. In a software context, an interface (e.g. in object-oriented programming, see Interface (Java)) is a pure contract definition without its own implementation — it specifies which methods a class MUST offer, without specifying HOW these methods work internally. An API is ultimately nothing other than a software interface at a higher, usually network-based level.
Backward compatibility through stable interfaces
A well-designed interface barely changes over years, even when the underlying technology completely transforms — this is exactly what enables backward compatibility. USB-A connectors, for example, have stayed largely the same for decades, while the internally transmitted speeds and protocol versions (USB 2.0 through USB4) have multiplied many times over. If the interface itself changes, by contrast (e.g. the switch to USB-C), physical compatibility breaks, no matter how similar the underlying technology otherwise is.
Interfaces as layers of abstraction
In software architecture, interfaces are often deliberately stacked in several layers on top of each other — an operating system, for example, offers a file system interface that can be implemented by completely different physical storage media (SSD, HDD, network storage), without an application reading files ever finding out which medium is actually behind it. This principle of layering (each level only knows the interface of the level below it, not its internal implementation) is one of the most fundamental design patterns in both hardware and software architecture.