Managing your heat in a system is a major design issue. Generally in a standard motor, air vents are enough to allow the motor to work without causing a meltdown. Some motors have fans attached to increase this air flow. There are also various lubricants used to ease things rubbing against each other and this can cause heat.
The type of building material has an impact on the heat. Modern metals offer better resistance to heat as well as possibly being a better conductor of heat to help dissipate it faster.