A longitudinal wave is made up of compressions and rarefactions. In compressions, the molecules of the wave are tightly compressed to form an area of high molecular density, while rarefactions have a low molecular density because the molecules are spread far apart.
Longitudinal waves move in a direction parallel to the vibration of the molecules of the medium. If the wave is moving from left to right, then the molecules also vibrate in a left-right direction. This causes the molecules in some areas to come close together to form compressions and the molecules in other areas to spread out and form rarefactions. An alternating series of compressions and rarefactions forms the longitudinal wave.