Choosing a crystal frequency will very much depend on what you are doing with the device. You need the oscillator to be running fast enough so that you can comfortably perform whatever you are trying to achieve within your time frame. For serial communication for example, you will want something fast enough to be able to process what you receive before being overrun by another reception etc. If power saving is critical in your design, you may want to choose a lower frequency etc.
I'm no expert in C, I normally write in assembler, but my reading of the delay routine is that it is a nested for loop, it has an inner and an outer loop. The outer loop is counting up the variable i, the inner loop is counting the variable j.
It works something like this:
The function is declared (Slow_Delay) and does not pass or expect any return variables (void)
The variables i and j are defined as integers
The value of zero is placed once in the variable i (i=0), the condition is then tested for true/ false (i<4000) each pass through the loop. Providing it remains true, it is incremented by 1 each time through the loop. The value of zero is placed once into variable j (j=0) and it too is tested for true/ false condition (j<2). Providing it remains true it will increment the variable j by 1 each pass through the loop. So the function is effectively counting 4000, twice, providing you with the delay.
I'm sure one of the guys that regularly use C will chime in with a better explanation, but this should get you going