What is the Desktop Window Manager (dwm.exe), and what does it do?

If you have ever opened Windows Task Manager, you have likely encountered a process named dwm.exe, the Desktop Window Manager. Upon seeing this, many users assume it is a virus,