Multiwindow Mode :
For this feature to work you've to install custom recovery & edit your build.prop, after that head over to developer options and scroll down a bit, now you will encounter Multiwindow Mode, Simply turn it on & you're good to go! This is mostly kind-off rooting(Custom recovery part) stuff, so edit it properly on your own responsibility, here are full instructions to do so. Although it is very buggy at the moment as you will see that in the video below by Tim Schofield. Though been buggy when you load up Apps in Multiwindow mode, every app(though 2 or 4) runs smoothly with in their allotted spaces. Don't get happy because when you hit back button you will soon see the glitches.
This is how Multiwindow Mode looks in Android M :
For Tablets :
For Phones :
Note : This feature isn't included in Android M dev preview in-built, please have knowledge about Custom recovery before doing this, i'm not responsible for any damage to your device!
Also See : Android 5.1 finally rolls out for Moto X(2013) in 14 more countries