The core relationship
Mechanical rotational power is the product of torque and angular speed: P = Tω. With speed expressed in revolutions per minute, angular speed is ω = 2πn/60. The relationship is purely kinematic/energetic; it does not by itself say whether a shaft, gear, motor or bearing is strong enough.
Why torque changes with speed
For a fixed power level, higher speed means lower torque and lower speed means higher torque. Gearboxes exploit this relationship while also introducing losses. A gearbox that reduces speed ideally increases torque by the same ratio, but the real output is lower because efficiency is less than 100%.
Use the relationship in the right place
Use it to translate motor power and speed into a first-pass shaft torque, or to estimate the power associated with a known torque and speed. Then separately check transient overload, starting torque, service factor, fatigue, thermal limits and power-transmission component ratings.
Common mistake: using rated power as peak load
Nameplate or continuous power can be very different from acceleration, jam, stall or shock torque. Machine design normally needs a load case rather than a single operating point.
Machine-design verification
Check the full load spectrum, fatigue, lubrication, material data, environment, manufacturing variation and the relevant machine-element standard before release.