Would was originally the past tense of will in the same way as should was the past tense of shall. But while the latter has acquired new shades of meaning, would has preserved those of will. Thus it expresses volition, and persistence referring to the past.
#1. Volition.
In this meaning, it is mostly used in negative sentences.
She was going away and would not say where she was going. (Dreiser)
#2. Persistence.
I asked him not to bang the door, but he would do it.
Several times Eckerman tried to get away, but Goethe would not let him go. (Maugham)
It is also used in speaking about lifeless things in the same way as will, but in this use would is more common than will.
…and that was all he could see, for the sedan doors wouldn’t open and the blinds wouldn’t pull up. (Dickens)