This small but mighty phrase, which dates from the 15th century, goes a long way in acknowledging kindnesses big and small. The less formal variation that many of us use today to express gratitude, thanks, appeared in Shakespeare's writings (in the way we use it today). Before then, the word thank was often used to mean "thought" or "good will."
Thanks a ton is another version of the simple thanks. A ton is very heavy, and it denotes a unit of weight equaling 2000 pounds. So, this casual expression of thanks lets someone know that you really mean it, because they can easily lock onto how big a ton really is.