Classes
Terraria classes explained: melee, ranged, magic and summoner
Terraria has no class menu. Your class is simply the kind of weapon you use and the armour and accessories that boost it. Here's how the four work and how to pick one.

The short version
- Melee: swords, spears, yoyos and flails. Tough, close up, and the easiest to start with.
- Ranged: bows and guns. Strong damage from a distance, but you need ammo.
- Magic: staffs, wands and spell books that cost mana. Huge damage, fragile armour.
- Summoner: minions and whips. Your minions fight for you while you move.
How classes work
Every weapon deals one type of damage, and armour sets and accessories boost one type. A "melee player" is just someone wearing melee armour and carrying melee weapons. You can switch at any time by changing gear, and many players do: you might use a bow against flying bosses and a sword everywhere else. Committing to one class matters most for armour, because a set's bonus only helps its own class.
After the Wall of Flesh you get an emblem for one class (Warrior, Ranger, Sorcerer or Summoner), which adds 15% damage of that type. That's a good moment to settle on a class for Hardmode.
Melee
Melee is the toughest class: its armour gives the most defence, and many of its weapons knock enemies back. Swords swing around you, spears and lances reach further, yoyos and flails hit from a little distance, and boomerangs fly out and back. Good stops on the way are the Blade of Grass and Muramasa, Night's Edge before Hardmode, and the Terra Blade after it. Feral Claws and the Power Glove make you swing faster.
Ranged
Ranged weapons fire arrows, bullets, rockets or darts, and you choose the ammo, so the same bow can shoot fire, poison or piercing arrows. The catch is that ammo costs money or materials. The Arms Dealer sells guns and bullets, and the Endless Quiver and Endless Musket Pouch remove the need to restock. The Minishark is a classic early gun, and Necro armour from the Dungeon suits ranged players before Hardmode.
Magic
Magic weapons use mana instead of ammo, and mana refills by itself. Use Mana Crystals to reach 200 mana, and wear accessories such as the Band of Starpower and the Mana Flower, which drinks a mana potion for you when you run low. Be careful with potions: drinking too many gives you Mana Sickness, which lowers magic damage for a short while. The Water Bolt from the Dungeon and the Space Gun with Meteor armour are strong starts.
Summoner
Summoners call minions that follow you and attack by themselves, and sentries that stay where you put them. Each minion takes a slot, and armour and accessories add more. Whips are the summoner's own weapon: hitting an enemy with one marks it, so your minions deal more damage to it. Version 1.4.5 added nine whips and new prefixes made just for summon weapons. The Finch Staff from Living Tree chests and Bee armour from the Queen Bee are good starts.
Which should I pick?
If it's your first world, try melee or ranged: they're forgiving and easy to understand. Choose magic if you like dealing big damage and can dodge well, and summoner if you'd rather focus on moving and staying alive. In multiplayer, a mix of classes works well, because nobody fights over the same armour.