The speaker compares his beloved to a summer's day. The summer's day has the downside of lasting only a short time. As he says, the "summer's lease hath all too short a date." This is the key to understanding the line you have a question about. Throughout the sonnet, the speaker makes criticisms of the summer's day in order to show how his beloved is superior. The summer is too hot sometimes, too cloudy at other times. His beloved is more temperate, more consistently good. The summer also "declines." In other words, it does not last forever. Its loveliness fades. But his beloved's beauty will last indefinitely (a long time and/or forever). The "thy" in the next line is addressed to his beloved. "Thy" in this case means "your."
But thy eternal summer shall not fade.
He is speaking to his beloved, saying that her loveliness is like an eternal summer. Unlike actual summer, which fades during its three month season, her loveliness and appeal will last forever. This sonnet, itself, completes the idea. His beloved will be immortalized in these lines. So, even when she has died, the speaker's beloved will live on, if not in the minds of those who knew her, in the lines of this sonnet:
When in eternal lines to Time thou grow'st.
So long as men can breathe, or eyes can see,
So long lives this, and this gives life to thee.
As long as there are men to breathe and read, "this" sonnet will give life to his beloved ("thee").
This Shakespeare sonnet is comparing the writer's love to a summer's day. The line, "But thy eternal summer shall not fade", is referring to the writer's lover. As he is saying that a hot summer's day can be brightening and loving, the day will not last forever. However, the lover is another version of a summer's day, but the lover is eternal. To back up this statement, near the end of the sonnet, it states that men shall be given life as long as they can breathe and their eyes can see the beauty of the summer that is reflected from the lover.