Difference between X-Forwarded-For and X-Real-IP headers?

I've read this QNA. And yet, I don't get the utmost clarity on this issue.
In what scenarios will either of them be useful for me? How do they behave? Can you clarify a bit?