Some people can't imagine using Android without root access. For those people, Nexus devices provide the surest way to maintain root without a bunch of monkeying around. Marshmallow has only started rolling out to devices, and already there's a new beta of SuperSU and modified boot images to root your Marshmallow devices.
After upgrading your Nexus device to Marshmallow, you'll need to flash a modified boot.img file (contains the kernel and a modded ramdisk). This allows you to gain root with SELinux set to enforcing mode. The boot images might cause factory resets on some devices, particularly those with forced encryption like the Nexus 6 and Nexus 9. Then all you need to do is install TWRP and sideload the new beta of SuperSU.
Security is tight on Android these days, but Chainfire is still looking into the possibility of rooting Marshmallow without a modified boot. Stay tuned for news on that. Also be aware that rooting Android means you won't be able to receive OTAs, but factory images will still work.
- Francisco Franco