What's the difference between All-Mountain, Cross Country, Freeride, Downhill bikes?
The following list contains the basic characteristics and differences for the aforementioned types of MTBs plus 2 types of bikes that you didn't mention. Note that I've tried to summarise and "average" the characteristics of modern MTBs used today by amateurs and pros. So 9 kgs for XC bikes means that you can easily find 8 and 11 kg ones.

Cross country (XC) bikes:


9 kgs
hardtail (front suspension only) usually 80-100mm front suspension (air)
very steep head tube angle
carbon or aluminium
gears: 1x11, 3x10
29, 27.5, 26 inch wheels
will allow you do 80km rides across mountains and do incredible ascends. Sometimes these bikes are considered the "road bikes" for the mountain.
photo: 


All mountain (AM) bikes:


13 kgs
full suspension (air), usually 120-160mm
steep seat tube angle (good for pedaling), slack head tube angle (good for downhilling)
carbon or aluminium
gears: 1x11, 2x10
26, 27.5, 29 inch wheels
will allow you do 30km rides on the mountains which will include bug ascents and very nice downhill-like descents. These have been marketed as "do it all" machines. They can actually do it all almost good but nothing very very well. Also marketed as "trail bikes" or "enduro bikes" with some minor differences.
photo: 


Freeride bikes (FR):


18 kgs
full suspension (coil), 180mm
slack seat tube angle, very low seat, slack head tube angle
aluminium only
gears: 1x7 - 1x10
26 inch wheels only
will allow you to hit 2m+ drops to flat, hit burly lines, gap large jumps, descend on uncharted territory. To get to the top you usually push the bike or have someone get you there by car.
photo: 


Downhill bikes (DH):


15 kgs
full suspension (coil or air), 200mm
slack seat tube angle, very low seat, very slack head tube angle
carbon or aluminium
gears: 1x7 - 1x10
26 inch wheels mainly
built for going downhill at high speeds. Used for racing.
photo: 


Dirt Jump bikes (DJ):


12 kgs
hardtail, 80-100mm or rigid (no suspension)
lowest seat possible, very stiff setup, rear brake only
steel or aluminium
gears: none
26 inch wheels
built for groomed jumps, pumptracks, skate park riding
photo: 


Slope style bikes (SS):


15 kgs
full suspension (coil or air), 140-160mm
low seat possible, stiff setup
aluminium
gears: none or few (1x7) with lever on frame to allow spining of bars
26 inch wheels
built for park competitions containing insanelly large jumps, wallrides and stunts. Can be used in 4X racing or dual slalom races.
photo: