E# and F are what are known as enharmonic equivalents. They are the same note in an audible situation but written on sheet music they look different.
Some other enharmonic equivalents are E and Fb, B and Cb, B# and C.
It is often used in sheet music to simplify the written notation.
Joe