Once both the Tama's are on 'stand by' align them very close together, then press the middle button on either of your Tamagotchi's, it will automatically connect to your other Tamagotchi's IR signal.
This will enable your Tama's to play games, exchange gifts etc.