Download it from http://marlinfw.org/meta/download/ and unzip it to C:\Marlin folder (any other name will be fine as well). As of now, the latest version is 1.1.9.
To compile Marlin and upload it to your board you will also need Arduino https://www.arduino.cc/en/Main/Software It is easier to download and use an installer, but if you are proficient you know what you are doing.
Open Marlin.ino file from C:\Marlin\Marlin-1.1.9\Marlin directory. And select Configuration.h
Explanation of configuration.h is at http://marlinfw.org/docs/configuration/configuration.html#configuring-marlin-1.1
Piper 2 specifics:
Piper 2 may have 0 X and Y positions either at front left corner or back right corner.