Definition of a component according to the UML standard:
A Component represents a modular part of a system that encapsulates
its contents and whose manifestation is replaceable within its
environment.
A Component is a self-contained unit that encapsulates the state
and behavior (...). A Component specifies a formal contract of the services that it provides to its clients and those that it requires from other Components or services in the system in terms of its provided and required Interfaces.
A Component is a substitutable unit that can be replaced at design
time or run-time by a Component that offers equivalent functionality
based on compatibility of its Interfaces. (...)
A component defined by its API
In C a component can be a set of compilation units that define functions and global variables that are visible to other compilation units, and that may require the existence of functions or global variables in other components:
- the set of global variables and functions implemented by the component (and available for others) is the interface that is offered.
- the set of extern global variables and functions that are expected by the component to be defined elsewhere is the required interface.
A component defined by a structure
In C you can also develop using an object oriented style. Of course, it's not so nice and convenient as C++. But it allows to develop interchangeable components.
The trick is to use a structure that defines data members or pointers to data members (state) and function pointers obeying certain signatures (behavior). In this case, the definition of the structure defines the interface provided by the component.
Microsoft is for example using such an approach for its COM technology
A component defined by its system interface
A C component doesn't need to be a part of a larger programme and offer a source code or an object code interface. It can be itself an independent programme, that offers an interface at runtime using OS features, such as a network protocols (listening to sockets, or implementing HTTP or other network protocols), remote function calls or other IPC techniques (e.g. shared memory, mutexes, etc...).
The interface is a contract
As the examples above have shown, the interface is not limited to a specific language feature. An interface is a contract about what is provided and what is expected to communicate with the component.