|The 32 bits refers to the virtual address space of 4 GB. The lower 2 GB of this space is private to each process while the upper 2 GB is common to all processes and is reserved for system use. Note that this is virtual address space and has absolutely no relationship with how much RAM is in the system.|
Most modern processors have a 36 bit physical address space which allows accessing up to 64 GB of RAM. A computer may have less than 4 GB of RAM or it may have much more. There is no static relationship between these two address spaces. The fact that the physical and virtual address spaces are both 4 GB on many modern systems is more coincidence than anything else. For both technical and licensing reasons all 32 bit client versions of Windows enforce a maximum of 4 GB of RAM. Some server versions, such as Windows 2000 Data Center Edition do not impose this limit.
Note that hardware will also impose a limit on maximum RAM.
Applications know nothing of the physical address space. They access only their own private virtual address space. The system dynamically maps virtual addresses to physical RAM as needed. This is very complex and I will not describe it.