Pair Trading is a very lose term for what should actually be called a 'Relative Value Trading'. They all belong to a family of trading style called the 'Statistical Arbitrage'. Honestly its difficult to explain this here, reason being it requires some amount of background knowledge on statistic and business fundamentals.Â
Assuming you are comfortable with both, here is a brief step by step approach to Relative Value Trading aka 'Pair Trading'..
Step 1) Identify two companies that are similar in terms of business fundamentals - Sales, margins, debt, EV, market cap, regulators, cashflow etc.Â
Step 2) Check how the price movement for these two stocks are - you can use a simple correlation test to see if there are any similarities
Step 3) Run a linear regression between the two stocks to extract - Alpha, Beta, P values and residuals
Step 4) Check if the residuals are co integrated
By the time you reach step 4, you should have a fair sense on whether the the two stocks are worth pursuing as a pair. If yes..
Step 5) Construct a beta neutral or a rupee neutral strategy to identify position sizing (how many future lots to go long and how many to go short, how many stocks to buy in spot etc). This should be done for both the stocks
Step 6) Set up a tracking system to spot opportunities in market
Step 7) If you find a good opportunity - execute using a spread order as Hanan suggested and give time for the  trade to evolve.Â
Please note, this is just a nutshell of what is otherwise a very elaborate process.Â
I've been through this earlier - here is a quick tip from my past experience. Pair Trading does not work on all sectors. Works very well on banking and few metal stocks!
Happy Pairing. Â