The phrase "doumo arigatou gozaimashita" is pretty easy to explain.
It basically just means: "Thank you very much."
In this case, I'd put the definitions down as:
Doumo = thanks
It's pronounced, more or less,
Arigatou = thanks (yes, again. We're a redundant sort)
Gozaimashita = for something that has happened
dou mo ari ga tou go zai ma shi ta
If you're speaking to someone who is your equal or "lower" on the
hierarchy, you can just say "arigatou" or "doumo" (although just
saying "doumo" is more on the terse side of things (and can be taken
as being a bit rude)) to mean, basically, "thanks."
For people "above" you in the hierarchy (e.g. sensei, sempai), you
would usually say the full phrase. If you're going to drop something
out of the phrase itself, I would probably drop the "doumo" part and
just say "arigatou gozaimashita" to someone.
Note: The Japanese "r" is not really a "liquid r" with the tongue
curled back (we don't have that Amerrrrican Arrrr (as in "Arr,
matey!") in our phonetic system), but is more akin to the "l" sound
like in "lollipop." My Japanese "r" is somewhere between an "l" and a
"d" -- it's like an "l" but more like a "stop" consonant than a liquid
(although it still is a liquid).