I hear the whole day the terms class library, base class library, Framework, ...
What highlights a framework and what a base class library?
It is just a collection of routines (functional programming) or class definitions(object oriented programming). The reason behind is simply code reuse, i.e. get the code that has already been written by other developers. The classes or routines normally define specific operations in a domain specific area. For example, there are some libraries of mathematics which can let developer just call the function without redo the implementation of how an algorithm works.
In framework, all the control flow is already there, and there are a bunch of predefined white spots that we should fill out with our code. A framework is normally more complex. It defines a skeleton where the application defines its own features to fill out the skeleton. In this way, your code will be called by the framework when appropriately. The benefit is that developers do not need to worry about if a design is good or not, but just about implementing domain specific functions.
The key difference between a library and a framework is “Inversion of Control”. When you call a method from a library, you are in control. But with a framework, the control is inverted: the framework calls you. Source.
Both of them defined API, which is used for programmers to use. To put those together, we can think of a library as a certain function of an application, a framework as the skeleton of the application, and an API is connector to put those together. A typical development process normally starts with a framework, and fill out functions defined in libraries through API.
Original answer
Often you use libraries to get a certain functionality in your OWN software/infrastructre. For example printing a barcode, you would use a library to do so. A framework abstracts a whole class of problems, perhaps the problem of writing web applications. To do so the framework delivers the "frame" with all functionality and stubs you can programm against.
you call the code of class library where as framework calls your code
I'd argue that the two are fairly interchangeable... - it is simply a set of common re-usable code (in whatever platform you are targetting), usually supplied by the platform.
Maybe you could argue that the BCL usually represents the "pure" (vendor-independent) modules, where-as the "framework" may (depending on how you use the term) include the vendor's bespoke modules. But that it perhaps open to local interpretation.
A class library usually is a DLL or a packet of classes that you can "include"/"reference" into your solution and reuse.
A framework is usually a recurring pattern/solution targeted towards a specific context e.g. a GUI Framework. A framework more than often implies that you write certain pieces as dictated by the framework designers, slot them in the expected/correct places and it should work.
A framework usually contains multiple class libraries. As always, the terms are used in an ambiguous manner nowadays.. but the above represents the more common interpretation of the terms... mine atleast :)
The distinguishing feature between a class library and a software framework is that in a framework, the flow of control is not determined by the user´s code, but by the framework.
This is also known as Hollywood principle (don´t call us, we call you).
By the way, there is also a nice Wikipedia article on this topic.