I don't know the best answer but its really common question, you could start here, with this thread,
http://www.explorerforum.com/forums/showthread.php?t=249839
Or try searching on 'custom tune' and start reading, there is no quick answer.
You can get 1 or 2 custom tunes which is rather easy, you have to replace a computer chip in the PCM which has the custom tune already loaded, but my guess it will be over $500 then you have to get the tune or tunes. . . .from what i understand you can select from tunes 1, 2 or 3 tunes by a switch. One may be set for Pure Power with 92 octane, another MPG with 87 octane. .
Now to do your own custom tunes, you will need a laptop, Special Programming software (which by the way is Ford Proprietary, that might run you a couple of thousands of $$$ alone), OBDII reader and connection, a very good understanding of ECU programming, solid understanding of the CAN Protocol, and a few other things . . .ive knew a couple of Ford Eng. from years ago, they usually have Degrees (masters) in Math, or Mechanical engineering or both at least. . .