The magnetic quantum number is indeed the spatial orientation of the orbital. To attempt a description: You only have particular allowed values for the angular momentum, which is the velocity at which the electron is moving perpendicular to the electron-nucleus line. This easy to visualize, because they're not classical particles, and they don't move in particular 'orbits'. The electrons can only have particular values for their total momentum (the principal quantum number), and that momentum can be divided into the linear momentum (which would be in the direction in and out from the nucleus) and the angular momentum, which is perpendicular to that. Combine that with the orientation of the angular momentum, and these are the three numbers which dictate the shape of an orbital.
An 's'-type orbital has no angular momentum; in some sense the electron is entirely moving in the inward-outward direction. It's spherically symmetric because of this. Correspondingly it doesn't have an orientation in space, the electron is moving the same amount in every direction, no matter how you rotate it. So it only has an m of zero. If it's a p,d or f orbital, it has angular momentum and is no longer spherically symmetric. So there are several independent ways in which the angular momentum can be oriented in space. There's a finite number because the components of the angular momentum are quantized as well. The details of what the shape looks like and which orientations it can take have to do with the mathematics of http://en.wikipedia.org/wiki/Spherical_harmonics" , which is a bit tricky. But the result is that you have 2*l+1 possible orientations, i.e. if l=2 then the magnetic quantum number can be -2,-1,0,1,2.
I'll try to explain. If this goes over your head, don't worry too much: It's more than most chemists and physicists know about the topic. Basically, what you're looking at here is the number of
linearly independent ways the electron can move while having those particular values of n and l. So in the case of p orbitals, the simplest case where l is non-zero, you have three different orientations, along each spatial axis. These are linearly independent: There's no way you can add a p
y orbital and a p
z orbital together to get a p
x orbital.
Any state that has n=1, l=1 can be written as a linear combination of these three orbitals, which corresponds to an electron partially occupying several orbitals. (a 'superposition state' in quantum mechanics)
This isn't explicitly quantum-mechanical behavior though, to make a direct two-dimensional analogy, it's like the http://physics.usask.ca/~hirose/ep225/animation/drum/anim-drum.htm" . See the animations there? The fundamental vibration is cylindrically symmetric. It also has no nodes (areas where the inside of the drum are level with the edge), i.e. it's completely convex/concave. That's a two-dimensional version of what a 1s-orbital looks like. The second vibration is also cylindrically symmetric, but it has a circular node - between the center which is pointing one way, and the outer part which is pointing in the other way. That's analogous to a 2s orbital (except it has a spherical nodes rather than a circle).
The third vibration has a node-line running down the center, and the two bumps are symmetric along that axis, but have opposite signs (point in opposite directions). This is the two-dimensional equivalent of a 2p orbital. But if you look at it closely, you can tell that it's not the only one: If you rotate the thing 180 degrees, it's the same, but if you rotate it 90 degrees, you get another, equivalent, vibrational mode. Since you only have two independent directions on a plane, you only have two such 'orbitals' on a drum. But p-orbitals, being three-dimensional, have three independent directions. And the node is not a line on the surface but a plane in space.
For higher values of the angular momentum, you get the
http://x3f.xanga.com/721c904073133207432985/q161436131.gif" which have five possible orientations. Just as with the p orbitals, three of these are just rotated versions of each other, and they have two nodal planes. But then you have an additional pair (d
z2 and d
x2-y2) which look a bit different (weird, even). There's a hint in the names though. A 1s orbital has the mathematical function e
-r, where r is the radius. Obviously it's spherically symmetric. A 2p
x orbital has the mathematical function xe
-r, and x is the x coordinate. (p
y and p
z are the same for different coordinates) So in the plane where x=0 (the yz plane), the p
x orbital is zero. And if you plot the shape where this function has some value (ignoring the sign), you get the well-known double-balloon shape. So the 2p orbitals are basically the 1s orbitals, multiplied by x, y or z.
The 3d-orbitals then, are the 2p orbitals, multiplied by x, y and z
again. So you might expect there to be
nine d-type orbitals and not five: d
x2,d
xy, d
xz, d
yx d
y2, d
yz, d
zx, d
zy, d
z2.
But obviously, xy = yx, so those two are the same. So you're left with six then: x
2, y
2, z
2, xy, xz, yz. So why are there five d-orbitals and not six? The answer to that is because of the restriction that that the total angular momentum is constant, which (and this is a bit hand-waving) amounts to demanding that a linear combination of them can form a sphere. For a sphere, x
2 + y
2 + z
2 = constant. So the three orbitals that correspond to the squared terms aren't independent, and one of them can be eliminated, e.g. by having the z
2 and x
2 - y
2 orbitals. By changing variables obviously you can have other combinations too, but that just amounts to rotating it all. There are only five independent orbitals, because there are only five linearly independent ways of describing a particle with l=2. (Although the 'cartesian' form of the orbitals, with all six, is sometimes used in quantum chemistry)
So for a given value of l, there are 2l+1 values of m, corresponding to the unique ways an electron can move and still have that l value. The m value corresponds to the component of the angular momentum along some axis. (Again, no matter how you rotate it, you still have the same number of m values)
Finally, the reason why it's called the
magnetic quantum number is because electrons are charged particles. A particle that has angular momentum is moving in a 'loop', and a charged particle moving in a loop gives rise to a magnetic field. Again I should emphasize that electrons
don't move in a classical path, but their combination of charge and angular momentum still works the same way it does with classical physics. So, if an atom is an external magnetic field, the different orbitals will have different energies, because they correspond to different orientations relative the field. And so they have different energies. Ultimately, that means you end up with the Zeeman effect, where the spectroscopic lines split due to the changes in the energy levels.
You also have the fact that electrons have their own intrinsic magnetic moment due to spin. The interaction of the spin-magnetic-moment with the magnetic field of the orbital gives rise to what's called spin-orbit coupling. This also causes a splitting of the levels, although it's much smaller.