How does a crankset removal tool work?
The crank removal tool has two threaded pieces. The larger threads into the crank (after you've removed the crank-bolt with a wrench).  Tighten it all the way down, as these threads will take all of the force that is required to remove the crank.  The smaller threaded piece screws into the larger.  It has a flat end on it which goes into the crank.  Turn this until this flat end makes contact with the end of the bottom bracket spline (the bit that you removed the crank-bolt from).  Then keep tightening it.  The flat end will push on the spline and pull the crank off--remember that this piece is threaded to another piece that is threaded to the crank itself.  

It's an excellent example of a simple machine--the jackscrew. I'm sure that Sheldon Brown has a great description with photos, line drawings, etc... @gcb provides the link.