A hot box is the term used when an axle bearing overheats on a piece of railway rolling stock. The term is derived from the journal-bearing trucks used before the mid-20th century. The axle bearings were housed in a box that used oil-soaked rags or cotton (collectively called "packing") to reduce the friction of the axle against the truck frame. When the oil leaked or dried out, the bearings overheated, often starting a fire that could destroy the entire railroad car (and cars coupled to it) if not detected early enough.
The packing and bearing had to be regularly inspected by yard crews, and packing was often added at major stops. The journal bearing was replaceable, but if neglected, it would heat to a temperature where the babbitt bearing alloy would melt away, leaving the brass carrier riding on the steel axle, and result in a "taper journal". This would eventually lead to the axle fracturing and the car above falling onto the wheel, or failure of the taper journal, causing the side frame and journal box to fall below the level of the rails, either of which could cause a major derailment of the train. Train worker duties consisted partly of inspecting the train as it ran by, looking for smoke, sparks, or fire. They would then sound the audible report "All Black" to mean the train was not giving off any light energy that would indicate combustion or destruction of the wheel bearings. If the train worker saw "Red" or smoke, he would alert other crew members, or else make an emergency stop to the train to prevent further damage.
When this type of axle box was used, any diesel exhaust smells had to be tracked to their source, as a hot-box sometimes smells similar. Most of the larger railroads use defect detectors to scan passing trains for hot box conditions. Some of these detectors also have "automated mile posts" which send an automated radio signal to the train crew listing the train number, track number, number of axles on the train and train speed.
Modern ball, roller or tapered bearings can also overheat, but the likelihood of a roller bearing overheating is usually far smaller than with journal bearings. When modern bearings do fail, the balls or rollers and their races fail, generating heat which can ignite fires or be the ignition source of a dust explosion in grain, coal, sawdust, etc.