TEd has basically got it. They way it was explained to me by my father, who was a railroader, was that an engine carries with it its own fuel, whereas a motor is powered by an outside energy source to which it has to be connected. Hence, on the old Pennsylvania Railroad, they had steam and diesel engines which pulled trains, but the big locomotives which were mostly used for passenger trains and which ran by connecting to the electric lines over the track were called "motors" in official railroad parlance. The big black ones which ran out of Penn Station in NYC were the GG1 model. The power pickup, which looked sort of like a folding laundry drying rack, which made contact with the overhead power lines, was called a 'pantograph'. Good word for your collection of oddities.

Incidentally, a diesel locomotive does not directly drive itself by the diesel engine. The diesel engine is actually a large generator which provides power to the electric traction motors which drive each set of wheels. Thus you have both types of device in one large machine.