A VAST OVERSIMPLIFICATION:
pain in the front of the knee, raise the seat and/ or move it to the rear
pain in the back of the knee, lower the seat and or move it forward.
All adjustments should be in very small increments, and you should measure them so you can reverse the change.