A double top forms when price rallies to a level, pulls back, rallies to roughly the same level again, and fails — drawing an 'M'. It signals that buyers tried the same high twice and could not break it. A double bottom is the mirror 'W' at lows.
Confirmation
The two peaks are only a warning; the signal is the break of the neckline (the low of the pullback between them). Until price closes below that neckline, the double top is unconfirmed and can still resolve as a continuation. Patience for the break is what separates the pattern from wishful thinking.
What makes it stronger
The pattern is more reliable when the two peaks align with an existing resistance level, when the second peak shows weaker momentum or volume than the first, and when it appears after an extended trend rather than mid-range. The measured target projects the height of the pattern down from the neckline break.