Solids, liquids, and gases are made of particles moving through empty space, with different spacing in each state of matter.
Particles can bump into and off one another in a solid, liquid, or gas.
A vibrating sound source could push particles in the medium it is next to.
If a push is transferred into the particles in one part of the medium, it might result in a cascading series of collisions among particles across the medium.
Those particles transfer energy to other particles when they collide or bump into them.