Here's some fascinating behind the scenes of Avatar showing you how it was created.

The technology in this film is pretty damn impressive. As you watch, you'll see that James Cameron can basically pick any shot that he wants from any angle and the computer will recreate the scene. 

Youtube version for those having trouble with Hulu: