A classic pair involves two companies in the same industry with similar drivers. When the ratio between them moves several standard deviations from its historical mean, the trade buys the laggard and shorts the leader, sizing both legs so the position is roughly market neutral.
The central risk is that divergence is information rather than noise. If one company has genuinely deteriorated, the spread never reverts and the position simply keeps losing on both legs. A hard stop on spread width, and an independent check on whether anything fundamental changed, are the usual defences.
Pairs trading is the simplest instance of statistical-arbitrage and the one most prone to overfitting, since scanning thousands of combinations for historically cointegrated pairs will find many by chance. See backtesting.
Related: statistical-arbitrage, mean-reversion, market-neutral, backtesting, correlation, short-selling