Weapons are offensive Items used to deal damage to other Creatures or even players around you. They can be equipped in your main hand slot. Weapons come in various different shapes and sizes, and naturally this will reflect their behaviour in-game. Some Items are small and agile, but deal few damage, such as daggers. Other weapons are large & slow, but deal major damage on impact, such as axes or maces. Other weapons may be magical and can shoot projectiles at range.
The weapon item type knows 2 major item properties; damage & speed. The damage property indicates how much base damage the weapon does upon impact with another creature or player. The speed property indicates how fast the player can attack with full damage. The speed associated with the item is the amount of times you can attack per second. For example, if you manage to find a dagger with an attack speed of 3, you can attack 3 times per second with full damage upon impact. If you find a war axe with an attack speed of 0.5, you can attack once every 2 seconds with full damage upon impact.
With this, one can calculate the damage per second output by multiplying the damage with the speed, but don't worry; the math is already done for you when viewing the item as the damage per second is displayed on it. The attack speed is applied through a cooldown mechanism. If you try to attack with your weapon before it's fully cooled down, you'll still be able to use attack, but it will inflict less damage. For example, if you damage a creature or player while your weapon is at 50% cooldown, you'll do 50% damage.
These cooldowns are also incorporated into magical weapons. For example, if the weapon of a Mage shoots a magical projectile, then also this projectile will inflict less damage on impact if it wasn't fully cooled down. For magical weapons, this cooldown is also reflected in the particles of the projectile. If your weapon is fully charged, you'll see more particles and your projectile will overall look more powerful. If you spam the weapon, your projectile will look weak; because it is if you spam it.