A library is about reusable functionalities, but a framework is about reusable behaviors.
A library is something you call/inherit from your code, but framework is something that calls your code or provide services for your code.
A library is a collection of components and classes, where framwork is how abstract classes and components interact with each others.
I can explain the framework by this definition:
Framework is an abstract design that embodies how the application works, and it has "hooks" where you can "inject" your module, or component.http://techembassy.blogspot.com/2006/05/library-vs-framework.html