I am recently studying the operating system, and I found the paging system a little bit confusing, for example, what will happen when there is a 52-bit virtual address and a 40-bit physical address, with 4KiB page size, so there are 2^40 pages and 2^28 frames, how pages are mapped in this case (the pages are more than frames) and how would the page table look like? Any help would be appreciated.
Physical addresses refer to existing RAM memory. At any time, virtual pages can be mapped to physical pages (frames), or be swapped out on disk. Usually, just a subset of the virtual space is mapped (the rest being completely ignored by the process). That part is mapped to frames as long as they are available (possibly in competition with other processes). The rest is mapped to disk.
The mapping being quite dynamic, there is no particular relation between the virtual and physical addresses, and even less between their sizes. In theory, a single frame of RAM could be enough.