Flails
Flails are tools and/or weapons that can be used as agricultural tools for farming or weapons in a fight.
Types of flails
The most common flail is the Grainflail. It can be crafted with the "shift+M" key command and then selecting the "Utility articles" submenu from the crafting menu.
The Small Flail is a smaller, lighter version, also usable as a close combat weapon.
The rarer Ball & Chain and Warflail are specialiased as proper, purpose-built weapons, rather than tools also usable as weapons.
URW Game Encyclopedia description
The official URW in-game encyclopedia (accessed by the F1 key) describes flails (in general) thusly:
Flails are threshing tools for separating the usable parts from the rest of the harvested plant, but flails can be also used as a weapon. Threshing itself is one of the actions covered by agriculture skill.