Jailbreaking circumvents the security already in place, allowing you to install unauthorized applications on your iPhone. However, this also means that you can easily get malicious software on your iPhone, which makes it easy for hackers to install remote access tools, keyloggers, etc. which will compromise all of the information on your phone.

Restoring your iPhone to factory settings is a very simple process, and can be done right on the phone. Make sure you have a full iTunes or iCloud backup of your device if you wish to restore your contacts, photos, settings, music, videos, apps, etc: