What is a window frame, and how does ROWS differ from RANGE?

What does a window frame (ROWS BETWEEN …, RANGE BETWEEN …) determine? Which rows are included if you don't specify a frame, and when might the default give you an unexpected result?

ExplainWindow functionsSeniorAnalystData Engineer