Qt is just a C++ toolkit which manifests itself as a (shared) library plus tools. You get all the source code and compile the Qt library and tools on the system where it shall run, e.g. you compile the Mac OS X version on Mac OS X and get a Mac OS X compliant (shared) Qt library and tools.
Then you compile your program (of course, first you write it). It must be linked against this Qt library, then it is ready-to-run.
Now, let's say you wrote a nice program with Qt on Mac OS X. The Qt library covers nearly eveything: the GUI, memory management, threads, networking, file i/o, you name it. If your program fits into this and only uses the Qt API (which means that you don't invoke any operating-specific API), then you can simply copy the source code to Linux and compile it there (then link it against the Linux Qt library) and your program will run on Linux out-of-the-box.
Same goes for Windows, but for Windows - Mac cross-platform development you must buy a commercial license because Qt Windows is not free. However, Qt Mac OS X and Linux is free unless you write a commercial application which you're going to sell, then you would need a commercial license.
If you have platform-specific code in your program, let's say audio i/o or interfacing with a dedicated serial or usb device, then you must encapsulate it and re-write this section of your program for every platform you want to compile it on.
Using the Windows platform to compile a program using Qt for Mac OS X does not work. This would require a cross-compiler and all relevant libraries to be installed on Windows.
As you say, if you want to do cross-platform on Windows and Mac, you install Qt both on Windows and Mac. You get the full source code which compiles into the library/libraries and a bunch of tools such as a GUI designer, a translator which serves for easy localization, a comprehensive on-line documentation viewer and more.