You first start by laying track. Read Zeblote's tutorial in the thread that Sylvanor posted for tips on that.
After the track has been laid, go over it with track guides to let the train know that the thing it's sitting on can be followed as track.
Finally, place a vehicle spawn of some description over the track and spawn your train. There are commands to make it run, and I think they're explained in chrisbot's thread.