Threshing floors were large and flat open spaces1 located outside the town where people would separate the seeds or kernels of harvested grain from the rest of the stalk. They were located outside of the city. It is likely that the Philistines' raid took place during or soon after the harvest (see Judges 6:11).2
1 Now they told David, “Behold, the Philistines are fighting against Keilah and are robbing the threshing floors.”