Thanks, I understand. But I'm actually asking about how wordpress.com does it, so I can do the same on my self hosted site.
As timethief mentioned, this a question that should be asked on the WordPress.org support forums as you're looking to extend the functionality of your WordPress.org blog.
But since I'm already replying, I may as well answer your question. :)
Reminder to everyone else: None of the below applies to blogs hosted on WordPress.com!
We do it through a bunch of complicated server scripts that wouldn't really work on your own server. However TimThumb is a really popular script that provides similar functionality, but scripts like that can easily be used by someone to attack your site by requesting tons and tons of different sized images forcing your server to spend time generating all those thumbnails. It's not an issue for us because we have hundreds of servers.
A better solution than trying to make thumbnails using a query string is to just create additional predefined thumbnail sizes using the core WordPress function add_image_size(). Mark Jaquith also has a really good guide about featured images (aka post thumbnails) and additional image sizes that's worth reading.
That's the recommended way to create additional thumbnail sizes.
And if you need to create those new thumbnail sizes for previously uploaded images, try my Regenerate Thumbnails plugin.
Good luck and if you have any more questions, feel free to start a thread on the WordPress.org support forums. :)