The iterator pattern enables unified and simple access to the elements stored in data structures. Generators are lightweight coroutines. Think: functions that can be suspended and resumed. Among other things, they help with implementing iterators.
This blog post explains how iterators and generators work in ECMAScript 6. The iterator protocol has recently changed, this post explains the new protocol.