Quick answer
Set the rotation and fore-and-aft position first, since they set where your foot sits on the pedal. Then choose the float your cleat offers and adjust it for comfort. Make changes in small steps and give each one a few rides.
What float means
Float is how far your foot can rotate on the pedal before the cleat releases. Pedals with float let the foot move a little while you pedal, and some riders find that easier on their knees. Less float holds the foot more firmly in one position.
Float options by cleat type
Shimano SPD-SL cleats are sold by color, and each color gives a set amount of float. Yellow gives 6 degrees in total, 3 in each direction. Blue gives 2 degrees, 1 in each direction. Red gives no float. Look Keo cleats come in several float options, commonly 0, 4.5 and 9 degrees, so check which one you have before you buy. Some systems, such as Speedplay, adjust float with a screw on the cleat.
Set rotation and fore-and-aft position first
Install the cleat loosely and line it up with the reference marks in the maker’s instructions. Make small changes to the rotation and the fore-and-aft position, tightening a little at a time. Float should be set after these, since they change how your foot tracks.
Choose the float for comfort
Some float can help if your knees or hips are sensitive. Too much float can feel vague and can reduce power transfer, as some makers note. Too little can feel stiff. Pick the setting that feels comfortable, and change one thing at a time. Saddle height also affects knee comfort, so if you are still getting pain, check that too. The guide on how to adjust bike seat height covers that step.
Test and adjust over several rides
Expect a few rides before the setup feels right. Make small changes, ride, then check again. Note each change, so you can go back if something feels worse.
When to see a bike fitter
If you have ongoing knee pain, or your feet keep going numb or sore, see a professional. A bike fitter can look at the whole setup, including cleat position, float, saddle height and pedal alignment.