The Toy Train is a minigame from Professor Layton and the Last Specter.
It is gained by talking to Bucky just as you leave Triton Manor in the second chapter of the game. The game involves collecting different train sets throughout both Misthallery and London by solving people's puzzles. When Professor Layton is first given the train, Bucky will give him a free set to start his collection.
Playing the game is quite simple. The object is to create train tracks to maneuver the train throughout the course to avoid obstacles such as trees, houses, cars, and other trains. Not only that, but the train must enter the required amount of train stations and reach the finish.