Melee is simply "hand-to-hand combat". In Tibia this can be accomplished with swords, clubs, axes, or even your bare hands.
Distance Fighting, Rods, Wands, Runes and spells do NOT qualify as melee, since they can be used to attack from a distance.
Melee attacks always cause physical damage, although after winter 2007 update enchanted weapons may cause elemental damage as well.
The following is not accurate and needs a big lookover. It is completely wrong and is simply based on nothing, so don't count on it!
To calculate max hit with a weapon You should know the factor for the battle mode ( 7 for full attack, 5 for balance, 3 for full defence), weapon attack and skill of weapon used.
For example: someone is wielding Bright Sword on full attack mode and with skill 60 his max hit will be 7 * 36 * 60 / 100 = 108 (where: 7 is factor for full attack, 36 is weapon attack of Bright Sword , 60 is skill in weapon one wields and 100 is the factor by which one divide to get correct outcome. also can be written as 0.07*36*60) . So the game will be choosing random number between 0 - 108. Further this damage will be reduced by shielding and armor.