Communication between 2 arduino board.

Hi, I'm pretty new to arduino, and i have quite a handful of problems with it. I'm using arduino UNO. I'm currently working on a small project which requires me to send data collected from one arduino via wires to another arduino where the data is to be stored. I tried connecting the RX of arduino1 to the TX of arduino2 and the TX of arduino1 to the RX of arduino2 and also connected the ground of both to each other. But the problem for me now is not knowing which program to use for such a transmission. I connected arduino1 to one laptop and arduino2 to another laptop. Can someone help me?

use the example about the newsoftserial library on each arduino.

It will do the job.