Anything metal laying across the rails will cause an electrical short circuit. If your locomotive derails, its wheels can also cause a short circuit. Depending on the type of transformer that you have, this will either trip a circuit breaker or cause the transformer to emit some kind of short circuit signal. Before you can continue running, you have to clear the short circuit from the rails. You may also have to reset a circuit breaker on your transformer.
Before running your trains, you need to be familiar with your transformer's short circuit protection. You need to know how it indicates that a short circuit condition exists. If your power pack has a circuit breaker, you need to consult your train set's instructions on how to reset it. Power packs that emit sounds reset themselves as soon as the short circuit is cleared. In the photo, the green light on the Lionel CW-80 transformer will blink when there is a short circuit on the rails.