Press w to wield a weapon. To attack a monster in melee, try to move into its square. To use a ranged weapon, wield the launcher if applicable, then t throw or f fire the ammunition (after placing the ammunition in your q quiver). It is not necessary to wield a thrown weapon, such as a dagger or darts, unless you're trying to throw Mjollnir.
You can have a secondary weapon, and switch between both with x; to set a weapon as your secondary weapon, press x - your main weapon will become secondary, and you will be barehanded - then wield your other weapon.
Wielding an item, of course, requires touching it, so be sure to wear gloves before wielding something you don't want to touch.