Image above is taken from http://www.robot-electronics.co.uk/htm/cmps3tech.htm. On the page there is technical information about the compass as well as some advice on how to use it.
There seems to be two main ways to get data from the compass, the first and possibly simplest is to read the PWM output as analog in on the arduino and the second is to use the wiring I2c. Whatever data you get then has to be translated into a usable figure for your application.

The image above shows the wiring for I2c connection. I think that this connection is probably better (more accurate) than PWM and seems straight forward to use.
A student (weblink) here at Goldsmiths is making a compass that locates a user to landmarks around cities. Taking the Tigoe code as a starting point I am going to create a compass that outputs to 8 LED's positioned at 45 degree angles around a circle so that there are LED's at North, North-East, East etc. Image below shows the prototype under construction with the positioned LED's.

The project is a non-fully working prototype as there is no GPS which would be needed to work out positional angles. Otherwise it is fully working in a static environment (To see a youtube video of the user scenario click here). The user chooses the landmark and the light pointing to the direction lights up. This project would probably work really well if linked to a mobile with GPS which is very possible and could be a next stage.