Sub-millimeter is a little tricky.
Very high (few centimeter) resolution can be done in real-time, in fact, under some limitations. Keyword: real-time kinematic.
One important component is using a reasonably short baseline: you have a receiver at a known location somewhat nearby (in many places there are networks of stations run by the relevant governments), and you compute difference between your solution and the station's solution. Most of the errors are common between the two and so they cancel.
Another important component is carrier phase tracking: The receiver processes the signal to recover the carrier phase. This boosts the resolution from the code timing to a level determined by the carrier frequency (and signal bandpass). Unfortunately, it leaves an integer ambiguity-- you know you are 'something' + 0.233 cycles from the sat, you need to solve for the 'something'; you can do this by collecting enough data as the sats move around or by starting at a known position and moving while holding a lock.
Another component is multiple frequency operation. There is a set of GPS signals on the L2 band some 350MHz lower in frequency. If you imagine the lattice of integer solutions in 3D space for two different frequencies you can observe the the integer solutions coincide very infrequently, leaving few options to choose between. Dual frequency operation also allows for correction of ionospheric effects.
Another component is semi-codeless tracking: The L1 and L2 GPS signals have a military P-code signal which is encrypted. The P code signal runs at 10x the speed and has a much longer repeat interval, this increases the accuracy of code tracking and improves multipath resistance. The L2 signal has historically only had the P-code stream. The encryption would be a barrier except it's kind of broken: The codestream is 10MHz but the stream cipher runs at only 500KHz and the same signal is sent on L1 and L2. Because of the first property you can still range against the P-code and because of the second you can find the phase offset between L1 and L2 quite precisely. (Trade name for this kind of codeless tracking is "Z-tracking"). --- this is hopefully becoming less necessary now with new civilian (unencrypted) signals on L2 and L5. The new signals also have better anti-multipath properties.
Any survey receiver worth the name implements these techniques and many more. For realtime (non-postprocessed) output using the above, accuracy is 2cm +/- 2ppm (of the distance to your reference station) or so.
What postprocessing does is lets you use very accurate orbital and ionospheric data which is available for download some hours later, built based on observations by many known-position ground stations. (I believe the Galileo sats even have retro-reflectors for laser based ranging, though I don't know if they're used yet.) ... plus using many hours of observations as the sats move through the sky.
So like any modern technology, the state of the art result isn't given by any one technique but by many combined.