How does the Head and Shoulders pattern indicate a potential trend reversal in the stock market? Discuss its formation and significance

How does the Head and Shoulders pattern indicate a potential trend reversal in the stock market? Discuss its formation and significance.