Spawn Conditions
Skeletron is summoned by speaking to the Old Man at the Dungeon's entrance at night, who will turn into Skeletron when selecting the "Curse" option. If the Old Man is spoken to during the day, he will ask the player to return at night. Skeletron can only be summoned once per night, as the Old Man will not respawn until dawn. While players with less than 300 maximum health and/or less than 10 defense are deemed too weak by the Old Man to lift his curse, he still offers the option to summon Skeletron.
Skeletron can be summoned repeatedly this way until it is defeated. Once it is defeated, the Old Man's curse will be lifted and he will no longer appear. Skeletron can be re-summoned thereafter once the player acquires the Clothier Voodoo Doll (from Angry Bones or Dark Casters), then by attacking and killing the Clothier during night.
Killing the Clothier using Flymeal will not summon Skeletron unless the Clothier Voodoo Doll is equipped.
Stratigies
Skeletron is a large skeleton, composed of a Skull and 2 Arms. In order to defeat it, you must kill the Skull.
It attacks the player mostly by swiping its hands. This attack is quite easy to predict, as it prepares them by lunging them backward, so you can prepare to dodge them. However, the main issue is their erratic trajectory. You can dodge them by either jumping or running around. It can use both hands to have different timings and trajectories, so you might get caught off-guard by trying to dodge its other hand. You may also try grappling to a wall and then using a piercing weapon to deal damage, then when Skeletron comes closer switch to a melee weapon and grapple to a wall on the other side, dealing damage on the way.
Timing is key in order to defend from the hands: after dodging them, use your piercing weapons to deal damage to both arms (and Skeletron's skull, if it happens to align with them). The arms don't have much health, so they can be detached fairly easily.
After some time, Skeletron will use its signature spinning attack. It's slow, but constantly homes towards you. During this attack, which lasts for quite a bit, it is the most vulnerable; it increases the power of the attack but loses all its defense. As such, use the fastest weapon at your disposal to deal a lot of damage. However, make sure to constantly move; if you get hit by it, you take a lot of damage and you get Bleeding debuff, which stops Health Regeneration.
During the spin attack, the hands will stay fixed in an uphanded position while Skeletron moves. You can also use this time to deal damage to them, but keep in mind that their defense isn't reduced.