A wave travels through a medium by moving particles back and forth. A longitudinal wave, also known as a compression wave, moves particles back and forth in the same direction as the wave. A transverse wave moves particles perpendicular to the direction of the wave. Also, despite the fact the particles move, they always return to their initial position, so their overall displacement is 0. It is the energy which moves, not the matter.