Although many LEGO train fans may disagree, the latest "Power Function" system used to control the trains via infra-red has an interesting benefit in that almost any device with an appropriate IR transmitter can control the trains - including Arduino.
The process to control trains in this manner is being documented on the LEGOpal blog with some useful first starts. This includes the required circuit to connect an IR transmitter to an Arduino and the required library to make control easy. In no time at all you can send the signals for speed and direction control, a quick demonstration of which is shown in the following video:
If you're looking to learn about Arduino development platform and how it interacts with external devices, you can't go past "Arduino Workshop - A Hands-On Introduction with 65 Projects” by John Boxall.
Arduino Workshop takes the reader from having zero knowledge about the Arduino platform, electronics and programming and leaves them with the know-how and instructions on everything from blinking an LED, to robotics, wireless data, cellular communications, motor control, sensors, Internet connected systems and more. For more information including a sample chapter and table of contents, visit the book page.