Backing-up all iPhone data (SMS chats, contacts, contacts, calls list etc.) is automatically done by iTunes every time you connect to it. If you later connect to iTunes the iPhone after a total reset, or connect a new iPhone, iTunes asks you if you want to restore it from the previous backup. It is as easy as it sounds.
Attention: the process does not backup settings and data stored by third party applications. Only the built-in apps' data is backed up and restored.