Functionalities are given to objects by wrapping them. Some concrete decorated class inherits from an abstract class. This class is also subclassed by a decorator class (either a concrete decorator or an abstract decorator with several concrete subclasses). This decorator contains a pointer to the abstract superclass and implements all methods of the abstract superclass; each such method then calls the corresponding method of the abstract superclass, and optionally performs additional computation.
It is easy to see how the decorator pattern is a backwards strategy pattern: while in the strategy pattern, some client object contains a strategy which it calls, in the strategy pattern, the client object is contained in a decorator, which calls it. It is similar to the Composite pattern in that decorators can be composed. That is, a decorator can contain a decorator, which can contain a decorator, and so forth. The base of this must always be a decorated class, because the decorator contains a pointer to something.
The decorator pattern is useful in situations similar to the strategy pattern, when subclassing is not appropriate for adding functionality to a class (for instance, when different functionalities must be added to different instances of a class). Its advantage over the strategy design pattern is that decorators can be composed, adding multiple functionalities (both overlapping and independent) to an object.
The decorator has is much more flexible than static inheritance. It also allows for modular featurization, allowing you to avoid big bulky classes that do everything. However, this can lead to more complicated code (with many little objects that differ in how they are linked together at runtime, with little static information to work from). Finally, the decorated object doesn't need to know anything about the objects that decorate it. However, this prevents the object from customizing the decoration.
The following graphic shows a class diagram of the decorator design pattern. Image based on a diagram of the Decorator pattern from Design Patterns.