Arduino Mega-Nano Communication

I am starting a project that will require communication between an Arduino Nano and Mega. I understand how to wire the tx and rx pins but I am not sure how to tackle the software component of this. Any help is appreciated.