Get sword, hit stuff.
There’s probably more to it, but that’s how i’ve been doing it.
when I read the thread title on the start page I had to look at it for posts like this. I haven't been disappointed!
Regarding the answering of the question:
It depends on a lot:
What is your role in the team? What is your build? What is your class? How much damage can you withstand? How much damage do you deal? How feebly are your opponents? Is it PvP or PvE? Do you play with henchies, players or solo?
Depending on all the above you will be: Puller, tank, support, AoE, singletarget takeout, spike damage, etc...
There's no general behaviour that always applies except - in the end you "Get [weapon], hit stuff"
As puller (only in PvE) you cast your protection type skills and draw a specific group to a proper spot to koill them. As tank you'll cast your protection type skills, collect as many mobs as your party can handle, pull them to a proper spot and block esp the melee from your team with weaker armor than yourself. As support you stand alongside your midline and well - support (imbagon and the likes). For AoE you go to the densest populated spot and hit those AoE skills while also keeping yourself alive (often in easier areas you are AoE and tank). For singletarget takeout you select your target (usually a monk or a dmg-heavy caster - you'll have to conclude which one is yours with the team) and do everything in your power to prevent it from doing what it is supposed to do (usually with rupts, knockdown, blind, dazed or reduction of movement speed). As spiker you select the agreed on target and either wait for the call or call if you're the caller and the hit it with everything you have (usually initialized with a knockdown, cracked armour or other ways to weaken said target).
As solo farmer usually it is either like the AoE/tank/support combination or the spike damage/tank combination.
With henchies you are usually in the tank/singletarget takeout/spike damage region, where you really want to take out monks and damageheavy casters first, or if useful in the specific area rather puller/tank/AoE, where you ball as many mobs as possible and hit hard - best if the casters/monks can be balled.
The melee is very versatile and can do many jobs - it depends on everything around you what suits best.