A conceit is basically an extended metaphor. After Shakespeare's time (the Renaissance/Elizabethan period), the metaphysical poets like John Donne became famous for using conceits, but theirs were often especially unusual. Metaphors always compare two unlike things, but in the conceits of metaphysical poems, the analogies are especially strange and/or complex (like when Donne compares a potential sexual encounter with a flea bite in "The Flea").
In Sonnet 18, one of his most famous sonnets, Shakespeare's conceit isn't so unusual, but it is carried throughout the entire length of the sonnet. The first two lines of the poem clearly identify what Shakespeare parallels in the poem:
Shall I compare thee to a summer’s day?
Thou art more lovely and more temperate:
He asks whether he should compare the beloved "to a summer's day." We already know the central conceit of the poem will show how the beloved is like the summer's day; however, Shakespeare gives this idea a bit of a twist by instead using the comparison or contrast to show how the beloved is actually superior to the summer's day. Line 2 already sets this up by saying the beloved is "more lovely and more temperate" than the summer. The colon at the end of line 2 suggests that the speaker will now go on to expound upon his comparison to prove how the beloved is better than a beautiful, warm day.
To complete the first quatrain, Shakespeare writes,
Rough winds do shake the darling buds of May,
And summer’s lease hath all too short a date;
Here, the speaker explains that the beloved is "more temperate" because the winds can be "Rough" and summer does not last very long. The next quatrain continues the conceit:
Sometime too hot the eye of heaven shines,
And often is his gold complexion dimm'd;
And every fair from fair sometime declines,
By chance or nature’s changing course untrimm'd;
The speaker builds his case by admitting that summer can be too hot. The seasons change, and nature moves on. Summer simply cannot and does not last.
In the third quatrain, the speaker changes course a bit to more explicitly discuss the beloved's superiority to summer. He writes,
But thy eternal summer shall not fade,
Nor lose possession of that fair thou ow’st;
Nor shall death brag thou wander’st in his shade,
When in eternal lines to time thou grow’st:
The speaker refers the beloved's "eternal summer," giving his impact, his beauty, and the speaker's love for him the advantage of having no end point. The beloved will never lose his "fair[ness]" as summer does. The speaker even says the beloved will best death, since he will live on in his poetry. Again, while summer lasts only a short time, as does mortal life, the beloved will live on, immortalized in Shakespeare's verse.
at the end of the sonnet wraps up the poem by emphasizing this long-lasting nature of the beloved when compared to the summer's day:
So long as men can breathe or eyes can see,
So long lives this, and this gives life to thee.
The speaker claims that as long as humankind exists, as long as eyes can see to read, the beloved will live on in his poetry. The sonnet itself "gives life to thee." The central conceit comparing the beloved to the summer's day rests on this thesis: summer is brief, but the beloved will live forever in the sonnet.