The locomotive is usually at the front of the train - the first car on the train. The locomotive is the part of the train that produces the power to make the train move. Modern locomotives use electricity and diesel fuel for power. Older locomotives used steam for power and were called steam locomotives. Steam makes the steam locomotive move.
Steam comes from water.
It looks like smoke but it is not. It is steam. Smoke comes from a fire. Inside the steam locomotive there is water and a fire to heat the water to make the steam. Steam under pressure provides the power to make the wheels go round.