In a transverse wave the oscillations are perpendicular to the direction of energy transfer. The ripples on a water surface are an example of a transverse wave.
In a longitudinal wave the oscillations are parallel to the direction of energy transfer. Longitudinal waves show areas of compression and rarefaction. Sound waves travelling through air are longitudinal.