In actual use there is a great deal of overlap and all of these expressions can be heard at some time.
I would recommend using "sorry" when you regret something, and would try not to do it again.
I'm sorry. I think I spilt your drink.
You use "excuse me" in advance of doing something that might disturb someone.
Excuse me. Could I borrow your pen?
Pardon me is used to apologise for minor acts of rudeness, or to ask for repetition of something.
{burp} Oh, pardon me!
Pardon me, I didn't hear you clearly.
Applying those rules, you should use "Excuse me. Does this train go to the city?" As you are using it in advance of asking a question that might disturb the person.