How do libraries and frameworks differ?

The technical difference between a framework and library lies in a term called ‘inversion of control’.