Weird melted wax thing is a tonsil stone. Just a build up of food, plaque, and other stuff. Usually comes with bad dental hygiene, but is not commonly a serious health concern, nor is it contagious. Just gurgle some salt water, make sure to brush the back of your tongue, and you’ll be fine. If it is the size of a small-ish grape or constantly returns, then you can consider getting surgery. Even then, you don’t really need surgery because it is more of a lifestyle problem than a serious health problem.