I see. I made a mistake having omitted 'for'. But the main difficulty for me is the context in which we should use 'a' or 'the'. Could you give more examples and explain them a little?
It is the same usage as for the articles generally. 'The' refers to a specific or habitual or unique train; 'a' refers to one unspecified train among several of them.