The boxes shown in the image are speakers and are used to produce sound.
How do we explain?
Speakers are made up of a cone, a magnet, and a voice coil. The cone is the part that vibrates to produce sound. The magnet and voice coil work together to create a magnetic field that causes the cone to vibrate.
When an audio signal is applied to the speaker, the voice coil vibrates. This vibration is transferred to the cone, which then vibrates the air around it. This creates sound waves that can be heard by the human ear.
Speakers are used in a wide variety of applications, such as home audio systems and public address systems.