Both さまざま (SAMA ZAMA) and いろいろ (IRO IRO) mean "many", "a variety of -" or "various" in English and they are normally interchangeable. However, sometimes you can't use them both. Let me give you some example sentences.
A) いろいろ is normally used when indicating different kinds of objects, ideas or situations of the same quality or nature. The word puts emphasis on amounts and range of differences.
1. いまの しごとの ことを いろいろ かんがえたけど、やめることに した。（IMA NO SHIGOTO NO KOTO O IROIRO KANGAETA KEDO, YAMERU KOTO NI SHITA) = I thought of all the different aspects about my present job, but I have decided to quit.
2. このケーキやには いろいろ ありますね。(KONO KEEKIYA NI WA IROIRO ARIMASU NE) = There are many kinds of cakes in this cake shop.
As for the first sentence, he or she did a lot of thinking for one topic "a job". As for the second one, they only sell cakes, but they have a variety of them. That is why いろいろ is used. It sounds a little odd if you use さまざま instead in the above sentences.
B) さまざま is particularly used for appearance, atmospheres or conditions.
3. たなかさんは さまざまな くろうを した。(TANAKA SAN WA SAMAZAMA NA KUROU O SHITA) = Mr. Tanaka has suffered through many difficulties.
You can use いろいろ instead in the third sentence if you put emphasis on the type of difficulties (e.g. financial problems).