How does Python Iterator (__iter__ and __next__) work?

How does Python Iterator (__iter__ and __next__) work?