How do I wire a GFCI to provide continuous power to a dishwasher and switched power to a garbage disposal?
Disclaimer: Working with electrical is dangerous -- don't do it if you can't do it safely -- call an electrician. Note: I am not an electrician, so I can NOT provide you "expert" advice.

GFCI will only protect things that are further away from the electrical panel than the items to be protected. Most people do not recommend installing more than one GFCI on a circuit unless you are certain that they are not on the same branch (one earlier on the line, one later on the same line) --this can sometimes cause you issues with random or circular tripping GFCI sockets, or waste time when trying to find which GFCI was tripped, and rarely provides a benefit.

Starting with a reference point, a three pronged receptacle has a left short spade (black/hot), a right tall spade (white/common) and the ground pin (copper/unshielded). A GFCI's connections on the back corresponded to these (except flipped); When looking at the back, white to the Silver (in U.S.) screws (tall spade side), blacks to the Brass (in U.S) screws (short spade side). Often, a red lead is added to the the black wire coming from your electrical panel (upstream) so that others will know which is the upstream and which is downstream.

With that out of the way -- You'll need to do some investigation to determine which is which.

Needed Items: 


Red electrical tape OR red electrical wire OR painters tape and red marker 
Electrical Socket Tester (cheap -- got mine at Wal-mart for a 
Wire Nuts (to cap off disconnected wires)
Recommend: A non-contact voltage tester is always good to have with working with electricity. Again, picked mine up at wal-mart for about $10.


Only leave breaker on long enough to confirm whether tester is on or off, unbalanced connections are dangerous. Always cap disconnected wires.

Steps:


Turn off breaker. (assume this for every step)
Connect only one white and one black (and keep ground connected). Turn breaker on. If outlet has power, you have your "upstream" wires. If not:
Rinse and repeat the first two steps, except:


2nd time: swap for other white wire.
3rd time: swap for other black wire.
4th time: swap white wire back (by this time you should have found your "source" wires)

On the black "source" wire wrap it on the coated part with a short piece of red electrical tape, or add a short red wire (of same load rating) using a wire nut, or fold a piece of tape around the coated part making a flap and put a red X on each side. Just for my own knowledge, I also put a piece of red electrical tape on the white wire as well, just so I know what wires go where.
The other two wires are your "downstream" wires.
Lastly, you should confirm exactly what is "downstream" of this outlet, once you have the 2 "source" wires connected and the 2 "downstream" wires disconnected, verify that what you expect to be protected will actually be protected, and that the wiring it not connected to anything unexpected (check lights/appliances/disposal/dishwasher/etc).


Note: You will probably want to do this first before going through the trouble of finding the specific wires, so that you can confirm which outlet should be replaced in order to protect your circuit.



The GFCI, at a minimum, should be labeled on the back with "LINE" and "LOAD" markings, and may also have "white" and "black". "LINE" refers to your upstream/source/hot wires coming from the electrical panel. "LOAD" refers to your downstream outlets/appliances to be protected.

You should refer to your specific GFCI markings, but this typically means (clock-wise from top-right on back of a vertical socket -- top-left in picture below) the connections are RED (line/source hot), BLACK (downstream hot), WHITE (downstream common), WHITE (line/source common). Both whites should be on one side while the red/black wires should be on the opposite side.

 from Source Website -- I don't know anything about this website, they just had a good picture.

Hope that helps.