The video you are watching slowed down above shows the basic logic of a speaker. Sound waves are formed by frequency. Our ear processes these vibrational waves that come at a certain frequency and presents us with notes.
The speaker is actually an electroacoustic converter. Speakers work by taking advantage of the properties of the electromagnetic field. Allows audio information on devices such as television, radio, and telephone to be audible. As a general logic, it converts incoming electrical signals into vibrations through its diaphragm, which allows it to sound.