A software artifact should be open for extension but closed for modification.

Basically, the behaviour of a software (or a module) should be extensible without having to modify that artifact.

How?

Using these two principles, we are able to separate the components in differnet levels and control the dependency between them using dependency inversion. Interfaces can also be used to control information hiding, to protect a component from another.

Each interface act as a seam we can leverage to extend the software without changing everything around.

Some patterns that allow this

An extreme example is a plugin system: software extendable at runtime, without ever recompiling or sharing the original source code!