Let's start with a couple of basic definitions:
Wave - A periodic disturbance that transfers energy
Medium - The material through which a wave travels
Not all waves actually require a physical medium through which to travel. This fact allows us to put all waves into two broad categories:
Mechanical Wave - A wave that requires a physical medium through which to travel. Example - sound waves. Sound waves can not travel through a vacuum (empty space).
Electromagnetic Waves - Do not require a physical medium through which to travel. Electromagnetic waves can travel through a vacuum. Examples: Radio waves, visible light, x-rays, etc.
When a mechanical wave moves through a physical medium, the particles in the medium oscillate in simple harmonic motion.
Simple Harmonic Motion
The blue ball above is in simple harmonic motion. Imagine that this ball represents a particle in a solid material. If this particle is bonded to other particles near it, its motion will affect the motion of the particles around it.
In the diagram above, the motion of the particle farthest to the left causes the particle next to it to oscillate. This oscillation is passed down through the entire series of particles. Note that the particles are vibrating up and down (in the vertical direction), while the wave itself is transferred from left to right (horizontally). This specific type of wave motion is called a Transverse Wave.
Transverse Wave - A wave in which the particles of the medium move perpendicular to the direction of the wave motion.
Waves can also move through a material when the particles of the medium vibrate back and forth in the direction the wave is moving. This type of a wave is called a Longitudinal Wave.
Longitudinal Wave - A wave in which the particles of the medium move parallel to the direction of the wave motion.
In the longitudinal wave above, the leftmost particle is vibrated horizontally in simple harmonic motion, causing the particles to its right to also vibrate in simple harmonic motion. The wave energy is transferred horizontally to the right.
Transverse mechanical waves can only move through solid materials, longitudinal waves can move through solids, liquids, and gases.