Second partition to keep data safe?
It is rare to need to reformat the operating system only part of your Mac.

Recommended: Use one partition

I believe the overwhelming majority of Mac users have a single partition on their internal drive. This lone partition is used to store everything: operating system, applications, and documents.

The UNIX-like file layout does a good job of keeping all these files organised and separate. With OS X 10.11, new security measures have further isolated the core system files from your own files.

Back Up and Use Time Machine

In order to avoid loosing photos and documents, attach an external drive and turn on Time Machine for that drive. Time Machine is macOS's built-in back up mechanism. This will protect you from most problems.

In the worst case, you can wipe your Mac's drive, re-install macOS, and restore your documents with Time Machine.

Upgrades and Recovery

Upgrades of macOS only update the operating system part itself, leaving both your data and user-installed applications untouched. The same applies for reinstallation of macOS which can be done from the Recovery Partition without touching your data.

Optional: Isolating your documents

As a developer, I do separate my operating system and applications from my user documents. This is a habit from using earlier versions of macOS and before virtual machines made testing easier.

This approach is only a real benefit, if you use a separate physical device for the two partitions.

See Macworld's article Keeping Mac OS and data on separate drives for how to set this up.