Just as nodes can inherit from other nodes, to save you duplicating lots of stuff for nodes that are very similar, the same idea works for classes.
For example, imagine you have a class
apache which manages the Apache web server, and you want to set up a new Apache machine but with a slightly different config file - perhaps listening on a different port.
You could duplicate the whole of the
apache class, except for the config file. Alternatively, you could take the config file out of the
apache class and create two new classes, each of which includes the base
apache class and adds a different version of the config file.
A cleaner way is to inherit from the
apache class, but override just the config file.