The Cowboy is a class you can acquire by finding the Cowboy in a room in the dungeon and returning him safely to the tavern. On the way to the tavern he will join you in the fight. If he is hit by enough monsters he may die on the way, which nullifies the chance to acquire him as a class.
Once obtained, the Cowboy starts with a gold revolver filled with a handful of bullets. The Cowboy can shoot the coins you find as bullets with this revolver, converting gold into ammunition. The revolver has as many bullets as you have gold and uses up your gold as you shoot with it.