Stepper motors do get hot. Their cases can get up to about 100 - 110 degrees C. This is because the drive is supplying the motor with full current the whole time to keep the motor in position. (This is different than a servo where the drive only gives the servo motor as much current needed to maintain its postion. The servo has feedback for this purpose where the stepper does not.)
If you run a stepper motor on a desktop without a heatsink, depending on how much current the drive is setup to put into the motor, the motor is in danger of being burned up.
There are several ways to reduce the temperature that a stepper motor can get up to...
1) Mount the motor to a proper heatsink. What the motor mounts to makes a big difference. A gearbox does not make a good heatsink. Neither does a mounting plate that is the same size as the motor's mounting flange. The temperature difference of a stepper motor on and off of a heatsink can be up to 40 degrees C!
What is a good heat sink?
23 frame: 6-inch x 6-inch x .5-inch
10-inch x 10-inch x 0.25-inch aluminium heatsink2) Use the drive's current reduction ability if it has it. Parker's stepper drives all have some sort of current reduction ability that reduces the amount of current supplied to the drive when the motor is at a standstill. This works on horizontal loads without any external forces. When this function is used vertical loads could fall with ballscrews, belts or low friction systems with applied loads that are constantly trying to backdrive the motor. As step motors have higher torque at low speeds and less torque is required to hold a load than accelerate a load, whether a step motor will back drive in a current foldback condition depends on the system friction and loads. Leadscrews are typically self-locking or a brake on a ballscrew and would better choices.
3) Make sure their is plenty of airflow. A stepper motor in a tight and confined space will not be able to shed its heat. Using good air circulation and a fan will help the motor to dissipate the heat that it builds up.
More information on choosing a step motor and how motor current settings are chosen.
Stepper Motor Current Settings