The following characteristics differentiate Frameworks from libraries:
inversion of control - In a framework, unlike in libraries or normal user applications, the overall program's flow of control is not dictated by the caller, but by the framework.
default behavior - A framework has a default behavior. This default behavior must actually be some useful behavior and not a series of no-ops.
extensibility - A framework can be extended by the user usually by selective overriding or specialized by user code providing specific functionality.
non-modifiable framework code - The framework code, in general, is not allowed to be modified. Users can extend the framework, but not modify its code.
Basically a framework is a type of a library whose behavior cannot be changed. For instance, you can extend class ArrayList or HashMap in java, but you cannot change the behavior of those classes.