Depending where your ancestor entered Canada they may have taken a train to reach their final destination. Or they may have used a train to visit or travel within Canada.
Unfortunately train passenger lists do not exist in Canada for genealogy research. Those that may exist would be protected under the privacy act.
Employment records were kept but they are the property of the railway companies and not available to the public.
Records regarding the railway company and its operations do exist and some of these records have been made available to the public: