Borderlands: what's a Melee attack? Why? And how?
A melee attack is, well, a melee attack. You hit the enemy with a knife, bladed pistol, the butt of your gun, or sometimes, your fist. Brick and Lilith make use of melee the most, mainly because it's part of their special abilities. Doing a melee attach while in phasewalk (Lilith's special ability) will end phasewalk early, and can deal extra damage, if the right skills have points in them, and can also do some other stuff like daze enemies.
Basically you'd use melee in Borderlands like you would any other FPS: use it when you're close enough to hit them. On the PC, it defaults to v, on the console, it defaults to pressing the right stick.