Does it sit in between X11 and KDE Plasma? If so, why is it needed?
It’s described as a “window manager for the X Window System and a Wayland compositor”, but I thought that X11 were the window manager. Or KDE Plasma. Why is there yet another layer (supposedly) between these for handling windows?
X11 is the display protocol, X.Org is the Display Server, and KWin is the window manager.
It is this way because the X11 protocol was designed to separate the concept of a Window Manager and a Display Server.
On Wayland:
Wayland is the protocol, Window Manager + Display Manager have been merged into a single concept, KWin is that.
On both platforms:
KDE Plasma is the desktop, which isn’t involved in this pipeline at all, except for having some integrations with KWin specifically that aren’t part of X11 or Wayland protocols.