A gristmill (usually flour mill in British English) grinds grain into flour. Grist can refer to both the grain that has been separated from its chaff and to the ground grain.
Most old ones are watermills.They typically have a waterwheel and from 1 to 3 stones for grinding. Some have more. Water pours on to the wheel causing it to spin. This movement causes an axle inside to turn. The axle is connected to a gear which causes the grinding stones to spin. At the top, there is a chute filled with grain. The grain slowly falls through into the grinding stones.