Speculative Execution and Rollback

When a branch misprediction is detected, how does an out-of-order processor undo the speculatively executed instructions?