Skeletron

Skeletron is the boss that guards a world's dungeon. If one tries to enter a dungeon before killing Skeletron, after a short moment the head of the boss will come spinning and growling into the screen, impacting with the player and causing 9999 damage, effectively one-hit killing the intruder. To summon this boss, you must talk to the Old Man at the entrance to the dungeon at night. The man will transform into the Skeletron. If you attempt this at day, he will simply say "Come back at night if you wish to enter" or "I cannot let you enter until you free me of my curse".

Skeletron is a floating, massive skeleton head, with floating arms. What appears to be blood spurting from his arms and neck are most likely "the magic forces holding it together", as noted by Blue in a let's play video.

Skeletron will try to swing his arms at you and ram you. He has 6000 health points, so it is not a good idea for lower-end players to attempt to defeat this monster. He must also be defeated before the break of dawn; all players will instantly die if he is still alive at that point.

Once you defeat Skeletron, you may enter the dungeon as many times as you like, with no bother from Skeletron anymore. Once you defeat him, you may not battle him again on that map, and must create a new one to fight him.

Currently, if you attempt to enter the dungeon at night without defeating Skeletron, the floating heads that attack you will do only 35 damage like the regular boss. Meaning you could theoretically run into the dungeon and loot a few chests at night if you had potions. If you manage to defeat one (or more) of the Skeletron heads, it will count as defeating the boss, unlocking the dungeon normally.

The old man who stands in front of the dungeon can be killed if you manage to deplete his health, however, if you enter the dungeon Skeletron will instantly spawn and kill you.

Soloing Skeletron
The best way on defeating Skeletron on your own is gaining at least Shadow Armor and a good weapon such as Ball 'O Hurt or Sunfury as they can hit multiple times and has good range. Using Projectile weapons such as the Flintlock Pistol is also useful against the boss as it is fast and powerful due to its damage per second. If you've found a Starfury and have a fair bit of Mana and potions. You could use this very effectively against Skeletron as it can hit all parts multiple times. Meteor Armor or Cobalt Armor could be helpful due to the Mana reduction. Minishark can be good as well, it has very fast fire rate but uses much of ammo so bring tons of it; 2000 should be enough

When you start the fight your best bet is to get on the roof (which you would have previously flattened) so you have high ground and a lot of space to move so no zombies or eyes spawning can attack you. Once on top, you want to target his head because if the head dies the arms die, too. Remember to heal frequently when fighting him, as he has many troublesome moves which are hard to dodge such as his head spin attack.