Flow Traders interview question

How does the windowing works in spark?