For me:
XC = Uphill and downhill, I would say a lot of single track, mainly on trails, but involves technical sections including rocks etc. Its more fun to ride when your fit.
Trail = This is a hard one for me to define, I guess its trail riding, but i'm not really familier with it.
All Mountain = Takes a lot more of a beating, i would still relate all mountain to XC, however it will go downhill a bit better but not climb as good as XC. I guess All Mountain is rougg stuff including small drops jumps etc, but you can still push the bike uphill.