What is dwm.exe?

Desktop Window Manager · Microsoft

Draws the windows, animations and transparency on screen.

Is it safe?

The real file is in C:\Windows\System32.

High CPU or memory

High GPU or memory use: update the graphics driver.