A flail is an agricultural tool used for threshing, the process of separating grains from their husks.