A typical PM DC motor will run slower and at lower torque at lower voltage and may not turn at all. If it stalls it may drain the battery and damage it. However your example of 24V battery on 36V motor should run fine. Typically the voltage rating of the motor is the max for continuous use. DC motors are often used as variable speed motors where you lower the voltage to reduce speed. (AC motors don't work that way though.)
Of course the reverse case can be a concern for your battery and motor, i.e. running a motor at higher than rated voltage will draw a lot of current, possibly damaging the battery and over heat the motor burning it out if run continuously.