They are starting a mini-server on ports 20008 & 20009 using an included nodejs & libs, and then opening it in a webview. Each target platform has basic wrapper that controls node process, and opens a webview pointing to localhost:20009
For example, on Mac, everything (nodejs & libraries & assets) is included in TileMill.app/Resources/ then under TileMill.app/MacOS/ is TileMill which just loads node + index.js (in Resources/) and opens webview.
A simpler cross-platform way to accomplish something similar is to use node-webkit. Not only do you get easy deployment, but you can call nodejs directly inside the web-layer, instead of having a bunch of web callbacks. This means that you can do things like access files directly, and don't need to keep your client/server separate.