The Railway Children by E. Nesbit
When Father goes away with two strangers one evening, the lives of Roberta, Peter and Phyllis are shattered. They and their mother have to move from their comfortable London home to go and live in a simple country cottage, where Mother writes books to make ends meet.
However, they soon come to love the railway that runs near their cottage, and they make a habit of waving to the Old Gentleman who rides on it. They befriend the porter, Perks, and through him learn railway lore and much else.
They have many adventures, and when they save a train from disaster, they are helped by the Old Gentleman to solve the mystery of their father's disappearance, and the family is happily reunited.