The documentation is pretty good, but I have just posted a more detailed walkthrough in setting it up here:
I hope that helps.
Suppose the application uses Ajax for validation.
If the user enters a wrong captcha value, how to get a new one with Ajax?
rerendering the section should work, although I'm not sure partial submit on the captcha is the way to go. You'll probably want to track failed attempts to lock out brute force style attacks (which don't make sense mathematically in this situation, but bots aren't always that clever). Anyhow, that's just my opinion. I leave the captcha as part of the final form submission.