NXT Programming not working
From your description, it seems you use a motor block which just tells the motor to start running. This works, but since your program then comes at an end, all motor activities are stopped immediately.

To solve this, you have to make sure your program doesn't terminate immediately. You could either use a wait block, with a fixed timer after which the program (and motors) will stop, or maybe a block to wait for another condition to happen (button pressed, sensor activated, number of rotations reached,...).

Another solution would be to change your motor block and use a "move" block - which instructs a motor to move for a certain time (the block wait for that time to be completed).

Keep in mind this is all from memory though, I may be wrong on the particulars; but in essence I'm confident your problem is due to your program terminating immediately.