What to do in Hard Mode in Terraria?
You need to start breaking Demon or Crimson Altars with the Pwnhammer. This will spawn three new tiers of ores that you need to mine. The ore you get is determined at random when you smash an altar. The ores are: Cobalt/Palladium, Mithril/Orichalcum, and Adamantite/Titanium. Each altar smashed will spawn some of the next ore in the list, starting at the few new tier. The first spawns Cobalt (or Palladium), the second Mithril or Orichalcum, the third Adamantite or Titanium, then fourth circles back around (Cobalt or Palladium). After each ore is spawned once successive altar smashes will produce less and less of that ore. And each alter smashed will spawn a block of Corruption, Crimson or Hallow somewhere in the world which will contribute to the spread of those biomes. I have heard it suggested that the new ores are more likely to spawn in the underground jungle, but I cannot verify this from my own experience.
Now, I personally like to aim for Excalibur and the Megashark first. That's because you need souls of Might - dropped by Destroyer - to make them. I find him the easiest Hardmode boss to tackle. Because of that, I don't build a lot of hardmode gear (except armor). I only need the swords (I go back and build other stuff later of course). But before I worry about swords or armor, I go for the drills.
It looks something like this:
Mine enough cobalt for a drill then mirror out and make it.
Return to mine for Mithril. Mine enough for the Anvil and a Drill, then mirror out and make those. I will mine cobalt during this trip down, and if I have enough spare I will make a sword (since you can hold it down and swing it, a property the Mithril and Adamantite swords do not share), then armor pieces.
Return and mine for Adamantite and Mithril primarily. Make Adamantite Forge, then drill (though this is not strictly speaking necessary, but it is an upgrade), then make Adamantite armor. Then make Adamantite sword. I will use Mithril armor as a stop gap until I get a full adamantite set.
During this process, you want to farm crystals when you can (if you plan on using guns at all; crystal ammo is amazing) and get as many souls of light/night as possible (can drop from any enemy killed in the underground Hallow/Corruption). Those souls are the gateway item for summoning the new bosses.
Once I can summon the Destroyer, I get a weapon to kill it with. Typically that's a Phasesaber. I make Excalibur (which really speeds up farming him) then I make the Megashark (which I use for the Twins and Skeletron Prime).
My way is not the "best" way, but I find the Destroyer easiest and I rather like those two weapons.Bow lovers can easily substitute repeaters for this process, and you can kill the Destroyer for a Megashark or just try to farm the twins (for the Hallowed Repeater) first. Magic lovers want to forge Crystal Storm.
There are a lot of options. My general advice is not to stop and build a full set of armor/gear at each new metal tier. Build as little as you need to progress to the mining of the next tier. If you are dying a lot, then alter tactics (and if need be, do stop and make some better armor).
Once you kill all of the Mechanical Bosses, the Hard Mode Jungle awaits!