The Williamsburg County Fire Department says 38 train cars left the track during a derailment, leaving part of a highway closed as they repair the train and the tracks.