Earlier, Aydin at Snail's Tales posted photo evidence for his interpretation of a locomotive engine. I still think there's a chance it might not be an engine, but the simplest and most complete answer is that they are indeed locomotives.
So what about his first question? How can you tell what direction it's travelling? Trains don't do too well when pushed, so the majority of the time (if the train is moving), it is likely that the locomotive is pulling the cars. The cases where this may not apply are usually in rail yards or along industry spurs. If you see a picture of a long train, out on the mainline you've got a better than 50% chance that it's pulling the cars and not pushing them (assuming, again, that the train is moving).
I hinted at a case where you could be nearly 100% certain of dirction:
The picture at top, the steam engine is moving backwards and forwards below. Notice the smoke plume leaves a nice trail. Provided the wind isn't too strong, you could get an easy idea of motion. However, this doesn't always work either: sometimes they don't make much smoke.