There are a couple of different movements of the cleats to be set properly.
First of all the correct position fore and aft:
If they are set in the right spot you should be pushing through the ball of the foot for most people. So find the bump on the side of your big toe ( the ball of the foot ) and mark a dot on your shoes. Then line up the middle of the cleat with the dot. Some shoes do not allow you to move forwards far enough to line up with the ball of the foot. But that's OK; as long as you are not ahead of the ball of the foot. Reasons not to be in line with the ball of the foot include hot spots under the ball of the foot or an achilles problem.
Next the rotation needs to be set properly. 95% of the time how you stand and walk off the bike tells you how to set your cleats. For example if you stand toed out like a duck; then chances are you will want a toed out position on your bike.
Cycling is a fairly linear motion. But because the hip and knee joints are not mechanical hinge joints; but are ball and socket joints; there is a certain amount of conjunct rotation that occurs as you go around the pedal stroke. So if the cleats are set up properly your legs should be going where they want to go. Not in an uncomfortable unnatural direction for your body.
Here is a simple way to test your cleat rotation position. This is best done on a trainer.
It would be ideal if when you stopped pedaling you were in the middle of the float. This means that you can toe in and toe out equally. There is an equal amount of play on either side.
So to find out what your legs want to do on your bike:
Pedal X 5 - 8 or so pedal strokes. Stop at the bottom and try one direction ie: toe in/heel out to see how much movement/play there is.
Then repeat and test the other direction; ie: toe out/heel in to see how much play there is.
If for example you find that you have lots of toe in movement/play but little or no toe out; then that is where your legs are trying to go and you cleats aren't letting you go any further in that direction.
So you should adjust your cleats to give you more toe out.
To get more toe out you will need to aim the cleats in more. The opposite direction for more toe in. If the cleats are set up properly your legs should feel like they are going where they want to go. You shouldn't feel like you are fighting them.
With proper cleat set up your legs should be pedaling comfortably and injury free.