Now, I ain't a expert, but as I understand it:
For your friends/family and your 後輩.
For your friends/family and (most importantly) your 先輩.
A bit unique as it can mean ありがとう on it's own and is apparently even usable in 敬語 and formal settings which is nice. That said どうも doesn't just mean thank you, but also means hello and goodbye according to context.
Apparently the equivalent to ありがとうございます, However I'm not 100% on the nuance behind it, and it's likely ether a bit more or less polite then ありがとうございます.
The most polite of them all, used with your 先輩 of course.
Hope this helps mate, if you got more questions then just ask mate. :D