How do I get part flat on z axis?
If I understood correctly you want the bottom of the cube to be at z height zero. 

You can edit the cube in edit mode (press tab), select all the vertecies (by pressing a) and then move them up by 1 (gz1). 

After leaving edit mode again, you can set this scene to be the default scene when you open a new file by pressing Ctrl + u. If you open a new file now with Ctrl + n, you will find that the bottom of the cube is aligned to z=0.