Electromagnetic waves are made of two vibrating fields. One field is an electric field, and the other field is a magnetic field. The fields both vibrate perpendicular to the direction of wave travel, and that will create crests and troughs in the wave. The height of those waves is the amplitude of the wave, and the distance between two adjacent crests is the wavelength.
A longitudinal wave doesn't vibrate perpendicular to the direction of wave travel. Rather, the vibrations are parallel, so instead of crests and troughs, a longitudinal wave is made of compressions and rarefactions. A compression is the point in the wave where particles are closest to each other, and a rarefaction is where the particles are farthest from each other. The distance from compression to compression is the wavelength of the wave.
Light is an electromagnetic wave. As the wavelength and frequency of the wave changes, the type of light changes too. electromagnetic waves with really low frequency are radio waves, and those with really high frequency are gamma waves. Visible light is also an electromagnetic wave, and changes in the frequency will change the color.
Sound waves are an example of longitudinal waves, and a key difference with a sound wave is that it is a mechanical wave. It must travel through a medium, while an electromagnetic wave can travel through a medium but does not require one.