It might be different when using CloudFlare (I haven't investigated fully) but I assume it'd be the same as using Varnish natively.
When a URL has been detected as invalid a purge request is sent to remove that page from the cache, it is then re-cached when it is requested again. This process is usually done automatically through Varnish/other FPCs so don't see why it would be much different to CloudFlare.
As far as having the cache flushing on a schedule, this can be done fairly simply through the crontab with:
0 0 * * * /usr/bin/php </path/to/magento/install>/bin/magento cache:flush
But I have to note that I don't personally like doing this and only use as a last option. Most of the time the cache should clear automatically through the the FPC purging the pages that are invalidated.