How is the PID constants Kp KI Kd calculated?

I'm assuming an error of zero that results in an output of zero means there will be no change in the output.