it depends on the situation actually. it means "thank you" in English. for example, when you work at the office and you handed the manager something, and he would say "どうも" to you. but if the bost handed you something and you said it, sounds a lil bit rude. but if you are close to your boss, you could say it. in fact when i talk to my boss, I sometimes use it.
or, you could use it for ur friends as well. someone gave u a gift and you could say that :)))
"どうも" is a surprisingly versatile word. Can be used in any environment. "どうも" functions like a sentence prefix. for example "どうもありがとう" "どうもすみません"
In other words, "どうも" alone does not make sense to foreigners whose native language is not Japanese. However, in the case of Japanese people, they understand whether it is thank you or sorry just by saying "どうも". Therefore, it is safer to only use"どうも" with friends or young people.
From my experience, I think it's better not to think too much about "どうも".