WSL1 is really just a new system call interface for Windows.
WSL2 uses "disks" emulated via image files that are stored as ordinary Windows files (but in a secret place). This makes most file I/O from inside WSL2 faster than from inside WSL1.
WSL2 can use the Windows file system (and vice versa) via file servers.
When a Linux app inside WSL2 wants to use a Windows file, the Linux kernel (there is only ever one for all running WSL2 images!) talks to a Windows app that does the file serving.
When a Windows app wants to use a Linux file from a WSL2 image, the image first has to run (might take a little while for it to boot) and then a daemon there serves the file to the Windows app.
I think one of the file servers use a version of the 9P protocol. Maybe they both do.
WSL2 uses "disks" emulated via image files that are stored as ordinary Windows files (but in a secret place). This makes most file I/O from inside WSL2 faster than from inside WSL1.
WSL2 can use the Windows file system (and vice versa) via file servers.
When a Linux app inside WSL2 wants to use a Windows file, the Linux kernel (there is only ever one for all running WSL2 images!) talks to a Windows app that does the file serving.
When a Windows app wants to use a Linux file from a WSL2 image, the image first has to run (might take a little while for it to boot) and then a daemon there serves the file to the Windows app.
I think one of the file servers use a version of the 9P protocol. Maybe they both do.
https://en.wikipedia.org/wiki/9P_(protocol)
Things that do lots of file I/O (such as compiling) are way faster under WSL2 using local file systems than under WSL1.