With your bottom on the saddle and your hands on the bars in your normal riding position, place your heel on the pedal when the pedal is at 6 o'Clock, directly at the bottom of the pedal stroke. With your leg fully extended you should sit square in the saddle, not leaning to the side, and your heel should be in firm contact with the pedal, not hovering above it. When the pedal is placed in the correct position under the ball of your foot it will allow for the correct bend in your knee. Pain in your knee joints suggests your saddle height may be wrong for you. Your knee needs to be slightly bent to allow comfortable pedalling.