Interface, in C#, is a code structure that defines a contract between an object and its user. It contains a collection of semantically similar properties and methods that can be implemented by a class or a struct that adheres to the contract.
In general, an interface is used to describe a set of related functionalities that can be implemented in a class or struct. It enables a class to inherit multiple behaviors defined in multiple interfaces. It also helps to resolve the name ambiguity that arises while using multiple methods with same names existing in different interfaces.
Designing applications using interfaces helps to address the vital requirements of flexible systems such as loose coupling, separation of concerns and adaptability to future changes. Due to the isolation of components that implement the interfaces of an application, testing these components becomes easier. The .NET Framework library uses many generic interfaces (whose types are parameterized) in collection classes to represent items in a collection so that the boxing and unboxing operations on value types are avoided.