It's built into the OS - you don't do anything. Doze idles most of the phone's background activity when the phone is not in use and sitting still (i.e. on your desk or nightstand - it won't kick in if it's in your pocket while you're walking or in a moving car. The result is significant prolongation of battery life WHILE NOT IN USE.