Example for $form_state[‘rebuild’]
$form_state['rebuild'] is used extensively in multistep forms. Take a look at the more advanced examples in the Form Example in the Examples project.  It's used in AJAX forms, as a special case of multistep, so you may want to look at the AJAX example.