i'm writing this from memory, as i don't have hammer available at the mo to check it, and i'm too lazy to look up a tutorial on it, so some of this might not be exactly right.
your train is a brush entity (i think track_train is the name, make sure it's "track" and not "tank").
if you want to use a model (like a train engine like in cp_well), you create a prop_dynamic, set it's model to what you want, and parent it to your track_train brush.
if you'r eusing a model with your train, you probably don't want the brush to be visible in game then, so set it's render mode to "don't render", and texture it as nodraw (don't use playerclip, or clip ... otherwise people and sentry guns will be able to shoot through the train)
where it will go is determined by point entities called "path_track"
so plop down' 2 path_tracks. give them names like "track1" "track2" or something. and set them up so that A: they point to the other one for the next path_track field and that B: they use "fixed orientation" for the direction the train should face.
on "track1" set the flag "teleport to THIS path_track" to be checked.
now on your track_train, set the 1st path_track to be "track1"
if you want it to kill things, you create a brush and turn it into a trigger_hurt. i can't remember the damage type you need to use to make it display the train icon when people are killed by it.
next make sure that the trigger hurt is in front of the train, and parent it to the train.
now what you want to do is make sure that the trigger hurt hurts everything (except debris) - that's a flag that you check. this means it will kill sentrys/dispensers/teleporters that get in the way of the trains movement.
next create a filter_name entity and set it value to = the name you gave to any train props you parented to your train, and make the trigger hurt use this filter. this stops the trigger hurt from trying to apply damage to the train models.
note: trains normally must be built facing to the right in the top down view. however as your's is moving in a straight line, you can build it to face the direction you want it to go in, and set it's orientation type to "fixed orientation" (it's a flag i believe).
note2: parenting means that something will stay the same distance and orientation from what you parent it too. so you still have to make sure that parented things are positioned in the right place relative to the track_train, otherwise, they'll move in a straightline like you want, but won't be in the position that you want.
hope that helps