Is OS X Server an Operating system or a service suite? I have Yosemite.  I am considering installing OS X server 4.0.  According to developer.apple.com:


  You can, however, install OS X Server and enable Xcode Server on your
  development Mac.


What exactly is OS X Server 4.0?  Does installing require me to have a freshly formatted machine?  In other words, does it overwrite Yosemite with a totally new OS (similar to Windows Server 2012 vs Windows 8)?  Or, does it simply extend my Mac with new capabilities like a powerful program suite?
OS X Server 4 is an application. (.app) that is installed over the OS.  It won't require you to format the entire drive to install it.  It will just add the needed features to take advantage of the Server.app suite.