They do as you would expect
In the case of OS X, since it is based on BSD UNIX, all applications implicitly have a stdin/stdout/stderr triplet just like on other Unices so it uses them. Of course, whether or not the application uses them is another matter. The OS X Console utility gives a GUI to see the output of any running applications.
You can also compile applications on OS X as UNIX processes - and these don't have the application bundle structure. As I recall, originally you couldn't call this style of process from Revolution on OS X - but I believe this was fixed in 2.6.1.
In the case of Windows, you can compile executables in either Console mode or GUI mode. The former is provided with the standard i/o handles by the OS, while the latter has to request them.