There are some great answers here already - the short of it is that Windows XP has a 4 GB total physical memory limit. 32 bit addressing ends at 4 GB, so Windows (and other some other operating systems) use addressing space at the top of the available memory and work their way down.
Those addresses are sub-divided to manage both the PCI memory address range (MMIO) and physical user memory (RAM). Starting at the top of the address range, the BIOS takes roughly the first 512K of the address range. Next, your graphics card(s) need addresses for at least the amount of memory on them. Then, other things like IO cards, networking, PCI-e, bus bridges, etc. take what they need. The net result is that a 32-bit OS on an x86-based pc may allocate 512M~1G (or more) for the MMIO range BEFORE any RAM addresses are allocated.
Say for example, you have (2) 512M video cards. All of that memory needs to be addressed before your RAM can be. Add in everything else I mentioned above and you'll probably wind up with roughly 2.5G of address range left for your RAM.
XP Pro x64 and Vista, being 64-bit OS's, resolve this limitation by using a 64-bit addressing scheme (not PAE - PAE is only used on win32) to re-map MMIO above the top of the physical memory. But ONLY if you're using a 64 bit chipset.
Check this page out - it has some GREAT information: http://www.hardforum.com/showthread.php?t=1035670