You'll have to be more specific than that.
1) On what route and/or session is your train derailing?
2) Where on the route (or at what point in the session) is the train derailing?
3) What train is derailing - an AI train, or the one you're controlling?
3a) If it is your train that's derailing, are you following all posted signals and speed limits?