Phones can dial in three ways. Normal phones use Dual Tone Multiple Frequency (DTMF) dialing, where each number is a unique pair of two frequencies in a column x row manner. Cell phones use digital connections, but still use DTMF when the call is active so you can access an IVR.
Older phones use Pulse Dialing. Each number dialed actually breaks and makes the phone line connection n number of times. Real Rotary phones use this exclusively. Most normal phones have a switch that allow you to switch between DTMF and Pulse. This is still supported even in 2015. In the movie Hackers, one of the characters uses this to make an unauthorized call while in jail, by pressing the hook ten times really fast, to "dial" 0, to get the operator.
This break and make connection is also used to switch between lines, as in call waiting or placing a line on hold, or to set up a 3-way call. Some phones have a dedicated button for it called Flash.
The reason that people used to repeatedly press the hook is a combination of the above. Sometimes you are placed on hold or on the other line or to get the other side's attention.
Mainly this was before some modern phone signals were used, such as Calling Party Control. We all know this as the disconnect tone, and the off the hook tone. If you watch some shows, people used to take the phone off the hook to block calls from ringing. That behavior stopped when CPC introduced the off the hook tone, which is very loud and annoying. And more relevant to the question, the disconnect tone which tells one side that the other side has disconnected. Prior to CPC, you had no way of telling if the silence on the phone was silence or that the call was lost. The disconnect tone fixed that. People no longer had to toggle the hook to know you were hung up on, the BEEEEEP did it for you.
Oh the ever evolving PSTN technology.