Tim

Tim is a Caster skeleton found in the Underground. He can be recognized by his Wizard Hat. Just like any other caster, he will randomly teleport himself to a visible part of the screen after shooting three Chaos Balls. Defeating Tim is the only way to obtain the Wizard Hat.

Tim is immune to the Poisoned debuff.

Finding Tim
Tim can be found anywhere in Underground and Caverns layers. Its spawn rate is very low and completely random, but it seems to increase with Depth - it is more likely to find him closer to the Underworld. You can also increase his spawn chance with a Water Candle or Battle Potion.

Fighting Tim
Tim is a spellcasting enemy, and shares great similarities between himself and the Fire Imp, and when fighting he should be treated like one. Tim can cast spells that go through blocks, however you can deflect his spells with any type of melee object (ranging from Tools to Weapons). He fires three shots and teleports to anywhere on your current screen.

Trivia

 * His name is a reference to Tim the Enchanter from Monty Python and the Holy Grail, as confirmed by Blue on the Terraria IRC.
 * Tim looks exactly like a Dark Caster, except that he is wearing a Wizard Hat.
 * His clothing resembles the Robe vanity item.
 * Though all rare enemies spawn rates are low, Tim's seems to be the lowest, with a roughly 5% chance to spawn.

History
Tim Tim Tim Тим