That's a HUGE question. Just getting a spinning cube takes many, many, many lines of Direct3D code. How far along are you? Do you know any DirectX?
Anyway,
gamedev.net has some excellent DirectX tutorials and examples that you could look at.
BTW, what exactly are you going to make 3d?