The name trench foot is pretty dated now and it should be called a nonfreezing cold injury. The name trench foot came about as it was something that was very common in trench warfare when the soldiers feet were subjected to the unsanitary, wet and cold conditions of the mud in the trenches. This caused a vasospastic problem with the small vessels in the circulation and the subsequent reaction led to the condition called trench foot. Armies now take precautions to prevent this from happening. These days trench foot does happen in sports people, in extreme sports in harsh environments and in some occupations that work in cold environments.
Firstly, do not let the feet get cold and damp. Secondly if they do, dry them and warm them SLOWLY. A too rapid warming can lead to more tissue damage. The clothing and footwear use is really important.