First of all, interfaces are not extended by classes, they are implemented by classes.
An interface is just a set of public methods that have no body (code).
An interface describes how an object (class) behaves but without specifying the implementation.
It is used to avoid creating tightly coupled classes.
one class can just depend on an interface and it lets you provide the actual class that implements the interface easily.
Basically and interface provides a separation of how something is used from how it is implemented.
You can find here a simple example on how to use an interface: https://phpenthusiast.com/object-oriented-php-tutorials/interfaces