Sonnet 18 is a poem in which the speaker praises the beloved's beauty by comparing it to a summer's day. By the second line of the poem, though, we know that the beloved's qualities far exceed the positive traits of the summer's day mentioned in line 1.
Unlike the summer's day, the beloved is "more lovely and more temperate" (2). The speaker goes on to explain that the summer can be too hot and can pass too quickly. On the other hand, the beloved's beauty lasts beyond that short season:
But thy eternal summer shall not fade
Nor lose possession of that fair thou ow'st; (9-10)
The beloved has an "eternal summer." The admirable qualities of summer that make us praise it and long for it are everlasting in the beloved, while the season of summer itself inevitably ends and leads into autumn. The "season" of the beloved's beauty does not end and it does not lose its lovely traits.
The sonnet concludes with the speaker's most explicit explanation of how the beloved's beauty can last forever:
Nor shall Death brag thou wander'st in his shade,
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. (11-14)
The beloved will not die because he lives "in eternal lines," or in Shakespeare's poem(s). As long as men can see and can read this poem, the beloved and his beauty will continue. The poem immortalizes him and this description of him.