Does anybody know what this is and why it started smoking???

Also where does the part hanging off the coil go?