As said above it's going to vary from jurisdiction to jurisdiction but where I live this is how it goes:
You show up at traffic court on the date on the ticket, this more or less serves as an arraignment where you either plea guilty/no contest and pay the fine. If you plea not guilty you get a court date and show up then, (usually a week or two away). There when it's your turn you offer your case against a DA and the ticketing officer and the judge will then determine what to do. When making your case you're welcome to bring in any "witnesses" or anything like that. Only you are serving as your own lawyer so only you can ask questions of witnesses/the officer.
Afterwards the judge will make a ruling. From all of the traffic court cases I've seen the judge is usually not one to give much leniency to the defense. You broke a law, you were caught. The cop is going to say he witnessed you stopped over the railroad tracks and violation of traffic laws. You're going to say... "Well, umm...."
You could argue that you weren't expecting to get stopped there due to traffic moving along at one point and then coming to a stop (some up ahead stopped short on a yellow light causing everyone behind him to stop forcing you onto the tracks) or whatever your claim is, but the deck is heavily going to be stacked against you. You're better off saving yourself the time and trouble and just paying the ticket. If its a moving violation and you're worried about points on your license/increased insurance then when you go in on the date on the ticket ask to "amend" the ticket. It'll double the fine but makes the ticket, basically, a parking ticket meaning no points go on your license and it doesn't count against you for insurance purposes.
(Though I doubt the ticket you got was a moving violation.)
If you're going to fight this it's going to suck two nights or afternoons out of your life and in both cases you're more than likely going to pay the fine anyway. Consider it lesson learned and pay it. You can pay it now by mailing it in or just going down to the courthouse and paying it in person. Unless you've got a REALLY good excuse and even witnesses to back it up you're not going to have a prayer in traffic court.