In transverse waves the direction of energy transferred is perpendicular to the direction of particle movement.
In longitudinal waves the direction of energy transferred is parallel to the direction of particle movement.
We can demonstrate transverse waves by waving a rope in wave like form. We can demonstrate longitudinal waves by moving a spring back and forth.