To start with, every AC motor is designed around a specific voltage and frequency, so they all have an inherent "Volts per Hertz Ration" (V/Hz). As long as the V/Hz ratio is maintained, the torque output of the motor remains constant. Motors are designed to provide a specific amount of torque at the design speed, the product of which is expressed as HP or kW.
If frequency AND voltage rise and fall together, maintaining that same V/Hz ratio, the motor speed just changes with it. Because HP or kW is based on speed and torque, the HP output rises and falls along with it. But there are other limits as to how fast or slow any particular motor design can go, i.e. cooling issues and bearing ratings etc.
Frequency rises above rated without a change in voltage, the motor enters into "constant HP" operation where the torque will decrease as speed increases. The relationship is non-linear.
Frequency drops without a change in voltage, the motor saturates and overheats. Conversely, the same happens if voltage rises without a change in frequency.
Frequency drops without a change in voltage, the motor is under excited. Slip increases, motor overloads. The same happens if voltage drops without a change in frequency. Torque is lost at a rate of the voltage drop percentage squared, so if voltage drops to 80% of design, the torque drops to 64% of nominal.
And finally if you LOWER the voltage and INCREASE the frequency, the magic smoke comes out very quickly!