Weapons are items used to kill mobs faster which can be found as loot or created through crafting. When a player left-clicks a mob no more than 3 blocks away, they will deal a level of damage based on what they are holding. Also, some potions can be used as weapons.
Each material has a limited number of uses (referred to as the weapon's level of Durability), and each will deal a specific number of hearts damage (attack power). Better materials both mean more damage and higher durability, with the exception of gold, which has very low durability.
Critical hits can be dealt by sprinting or Jumping and then landing a weapon strike on the target. They deal more damage than basic attacks which can be dealt by just left-clicking a player.
Swords can break many blocks faster than punching them by hand, but each broken block wears down the durability of the sword at twice the rate, similar to when tools are used as weapons, as it is not being used for its intended purpose. The one exception is that the fastest way to break Web is too use a sword.