iTunes will backup everything on the iPhone, including SMS messages and contacts.
In iTunes, with the iPhone selected on the left, click the Info tab and make sure Contact syncing is enabled.