I wanted to build a building like the picture and what I did was putting two cubes on top of each other . I want know how this can be made from one cube I mean start from one cube and extrude or ...
In Edit Mode select the upper face and snap the cursor to it (press Shift+S-->Cursor to Selected).
Press E to extrude and then S to scale the extrusion. Confirm the operation with Enter.
Extrude once more along z axis. Press E, then Z and confirm the transformation.
Now select the whole extruded element and place it wherever you like, using G and choosing the axis you like.
And here it is.
If you do not want to mess with the topology of the lower part of the building, you can build them separately, select both, and join them with Ctrl+J.
Another option is to select the top face and duplicated it with Shift+D.
You will then be able to edit the different parts with complete flexibility, with no fear of ruining your work on the other parts of the building.