It uses the listening data from the last.fm API to pull the top artists and albums via AJAX calls, does a bit of data manipulation and then draws the graphs. This is all being done on your browser with the toy being served statically. You can try it with your last.fm user name but it will only give you a decent graph if you've been listening to a good amount of music recently. It's quite interesting to see how your listening habits change over time.
Update, I've changed the api calls im using to let it gather more data which makes it draw much better graphs, especially for people who don't use last.fm as much. Also fiddled with the mouseovers on the labels and lines to let you see the trends of the individual artists and albums more cleaner.