Weapons and armor have two factors that determine their effectiveness--type and level. All pieces of a single type (e.g. swords, staves, or cloaks) will behave similarly, with the level rating being a relative measurement of its power as compared to other pieces of the same type.
All equipment has a durability rating which affects its usefulness and which will gradually decrease with use. Weapons and armor both require that your level be no lower than theirs before you may use them, and armor has a strength requirement as well. All of this data may be checked by using the 'examine' command on an item.
Weapons come in many different varieties, each type having its own strengths and weaknesses. Depending on your attributes and preferences, certain types of weapons will be better suited for you than others.