The preterite is used to describe events that happened only once and have finished.
e.g. Antonio hizo sus deberes = Antonio did his homework (only once)
The imperfect, on the other hand, is used to describe continuous events in the past, or actions that someone used to do i.e. they happened more than once or were repeated.
e.g. Antonio hacía sus deberes = Antonio was doing his homework/Antonio used to do his homework.