The real story
A modem turned digital data into sound so it could travel over a phone line built for voices. The famous handshake was a negotiation. The tones checked the line for echo and noise, then the two modems agreed on the fastest speed it could handle. The speaker was left on by default so people could hear when something went wrong.
The top speed, 56 kilobits per second, came with the V.90 standard in 1998, and real connections were usually slower. Because the modem used the phone line, a family call cut you off, and in many countries every minute online showed up on the phone bill. That's why so many people waited until night, when calls were cheaper and nobody needed the phone.