Two stocks can each wander like a random-walk and yet their difference stays in a band, because something economic ties them: the same commodity input, the same index membership, a merger arbitrage relationship. That difference is the tradeable object.
Correlation and cointegration are not the same thing. Two series can be 0.9 correlated in daily returns while drifting apart forever in level, which makes a correlation-based pair trade a slow-motion disaster. Cointegration is about the level relationship, correlation is about the co-movement of changes.
Test with adf-test on the residual spread, or with the Johansen procedure for more than two series. Then be sceptical: cointegration found by scanning thousands of pairs is mostly multiple-testing, and even genuine relationships break when the economic link breaks, which is precisely when the spread is widest and the position largest.
Related: spread, hedge-ratio, adf-test, mean-reversion-half-life