The signal is fed into a number of delays in parallel. The 'voices' control sets the number of delays. Higher number of voices tend to give a lusher sound.
The delay time of each delay path is driven by an LFO. The minimum time is set by the 'Modulation Delay' setting, and the range of the LFO sweep is set by the 'Modulation Sweep' setting. For flanging, try times up to about 10ms. For a chorus effect, try times from 10ms up to about 30ms. Higher values will give you a normal delay/echo effect.
The 'Feedback' control introduces feedback into the delay lines, for sustained echos or deeper flanging effects.
The 'Spread' setting controls the amount of phase variance between the LFOs of the voices. E.g. two voices with a spread of 0.5 gives the classic quadrature phase stereo chorus effect.
The 'Shape' setting applies waveshaping to the LFO waveform, which has a corresponding effect on the nature of the pitch alterations induced by the modulation. It's hard to describe exactly how it affects the sound - experiment with it! For classic chorus and flange effects, leave this setting at zero.
I recommend these articles for more lengthy explanations of chorus and flange effects:
http://www.harmony-central.com/Effects/Articles/Chorus/
http://www.harmony-central.com/Effects/Articles/Flanging/