The model file basically consists of the details regarding an component.
Ex: when an nmos is called, the SPICE will look for the nmos model in the model file. It contains the details like Ids formulae for all the 3 regions (cutoff, linear & saturation). The SPICE will put the user entered values of W,L etc., into the model file & calculate the required parameters to complete the simulation.
This is an example of including a model file for a switch: .MODEL SW VSWITCH(VON=2.6 VOFF=2.4 RON=10 ROFF=1MEG)
A library file is always changing for every technology like 45nm,90nm,180nm etc.
To calculate the Ids equation, you also need technology values for Cox,Tox,Vth etc.in addition with the user entered stimulation values. The SPICE gets these values from the library file for calculation.