A wave is propagated by vibrations along the medium.
If the direction of those vibrations is perpendicular to the direction of wave travel, we call it a transverse wave.
If the direction of those vibrations is parallel to the direction of wave travel, it’s called a longitudinal wave.
–
Animation
Demonstration