An interface is a concept in Object Oriented programming that enables polymorphism. Basically an interface is like a contract, that by which classes that implement it agree to provide certain functionality so that they can be used the same way other classes that use the interface
Your example shows classes that guarantee that they have the getPrice method available. You can then write code that take advantage of objects that have this method without worrying about what kind of class it is.