The California State Train Museum is located on 2nd and I streets in central Sacramento. Parking on the street is only 2 hours max and also pretty hard to find. I recommend the parking structure found on I street (near the dead-end at Front St). The museum is across the street from the parking structure entrance. Becoming a member of caboose club pays for itself after only two trips, so if you live in the vicinity and might make this your rainy day destination, consider that investment.
This is a fantastic museum with lots of restored trains, most of which you can board and explore. On the second floor are a few tables of stationary wooden tracks and a bunch of magnetic wood trains that kids can play with. This in itself often holds the attention of the preschool aged kids for a long time, while parents can rest and watch on the benches nearby. Additionally, though, there is a section further back on this floor that has model trains (behind a plexiglass wall) that start when you push the button for its corresponding track.
You can additionally purchase tickets for a true steam engine that departs a few blocks from the museum. The train runs (every hour and makes a 20 minute ride down the tracks along the river and then a 20 minute train ride back. Around Halloween and Christmas they deck up the train and have costumed characters that roam the cars greeting the passengers. No food or beverages allowed on the train.