Pepsi (PEP) and Coca Cola (KO) are different companies that create a similar product, soda pop. Historically, the two companies have shared similar dips and highs, depending on the soda pop market. If the price of Coca Cola were to go up a significant amount while Pepsi stayed the same, a pairs trader would buy Pepsi stock and sell Coca Cola stock, assuming that the two companies would later return to their historical balance point. If the price of Pepsi rose to close that gap in price, the trader would make money on the Pepsi stock, while if the price of Coca Cola fell, he would make money on having shorted the Coca Cola stock.
The motion of both shares (or the whole market) up or down does not affect the profit of the trader. His position is neutral - protected. Trader earns/lose only on the relative price change. The probability that the price ratio will come back to the long-term average is statistically proven.