Let's suppose open() reads 2 letters at a time. (Actual value is io.DEFAULT_BUFFER_SIZE)
f=open('test.txt')
You've created a file object, _io.TextIOWrapper which, oversimplified, is like [{read from 0 to io.DEFAULT_BUFFER_SIZE of test.txt}, ...}
file=iter(f)
You've created a iterator of _io.TextIOWrapper with data like this: [{read from 0 to 1}, ... {read from n-1 to n}]
next(file)
next() has went through the first item of file, read it, and printed it.
Let's learn from an example.
Reading normally
test.txt
what a beautiful day
We will open the file, iter(), and list() to open and iter through all of it and make a list.
In [1]: f = open('test.txt')
In [2]: list(iter(f))
Out[2]: ['what a beautiful day']
Just as expected.
File changes after open()
In [1]: f = open('test.txt')
We've opened the file.
We will now append hello open() to test.txt.
test.txt
what a beautiful day
hello open()
and then iter() and list() it.
In [2]: list(iter(f))
Out[2]: ['what a beautiful day\n', '\n', 'hello open()']
The changed contents are seen. We can see that open() does not actually read the file.
File changes after iter()
In [1]: f = open('test.txt')
In [2]: i = iter(f)
We've opened the file and iter()d.
We will now append hello iter()
test.txt
what a beautiful day
hello open()
hello iter()
and then list() it.
In [3]: list(i)
Out[3]: ['what a beautiful day\n', '\n', 'hello open()\n', '\n', 'hello iter()']
The changed contents are seen. We can also see that iter() does not actually read the file.