These two words sound the same in spoken English; however, when the written their meanings are quite different.
All together means for everyone or everything. For example: “The guests were altogether in the dining room.” “This CD has the best songs of the 1970s all together in one place!”
Altogether means completely or entirely. For example: The test was altogether (completely) impossible because it asked questions about things we hadn’t studied in class.