How did a 19th century steam engine work?

I'm doing something about railways in the industrial revolution and I can't find much that describes how an old steam engine works. Does anyone know?
6 answers 6