Symbolism, Imagery, Allegory
Friendly Thomas The Tank Engine would not be proud.
A terrifying new technological advance in transportation. A huge almost-unstoppable force. A machine that kills two people—a guard when Anna and Vronsky meet and finally the titular Anna K herself. Yup: trains are a nasty three-headed symbol in this fat novel.
In fact, trains are the most important symbols in the story of Anna Karenina, due to their prominence in the torrid Anna/Vronsky story line. More specifically, trains are a destructive element throughout the novel. Vronsky and Anna first meet at a train station, where a drunken guard is crushed to death... and Anna calls the death an omen of evil. Her first encounter with Vronsky is basically overlaid with the specter of death.
(Pro tip, lovebirds: if anything that could be called an "omen of evil" happens on your Tinder date, tell your suitor that you're really sorry, but you have to, um, call your grandma.)
In some sense, Anna fulfills her own premonition of the dang omen of evil by choosing suicide via train—after all, Anna was taking tons of morphine already. It's not like she didn't have options in death, right? Vronsky too uses a train as the engine of his death, as it carries him to a war where he is determined to die. So, essentially, the love story of Annsky (Vronna?) is bracketed with the oh-so-cheery death-by-train.
It's possible to go further with the train symbolism—that trains not only destroy Anna and Vronsky, but Russia's old way of life. Trains help usher in a new era, and an industrial capitalist system. You can also think about the idea of trains as transportation, and draw a parallel to Anna being "transported" by love away from her duties and responsibilities as Madame Karenina.