Flattening allows you to remove some features from your document (blend modes, overprints, DeviceN color spaces...), maintaining the same visual appearance: the blend will be calculated to whatever is underneath at that moment and will be adapted in a lineart object (if possible) or an image.
As flattening has an effect on the objects in a PDF, it will be executed prior to executing any Action Lists or the Preflight Profile defined in that hot folder to guarantee the best result.