As stated in the PHP manual:
Generators provide an easy way to implement simple iterators without the overhead or complexity of implementing a class that implements the iterator interface.
OK, here is a more detailed and easy-to-understand definition from the same source, php.net:
A generator allows you to write code that uses foreach to iterate over a set of data without needing to build an array in memory, which may cause you to exceed a memory limit, or require a considerable amount of processing time to generate. Instead, you can write a generator function, which is the same as a normal function, except that instead of returning once, a generator can yield as many times as it needs to in order to provide the values ...