Limit switches are homing switches used to prevent the motors from hitting the end of each axis (crash). These crashes can cause your CNC alignment issues not to mention damaging motors, gears, belts and screws.
Limit switches can also be used as homing switches to establish a known point of origin usally the front right corner. Although you can use any corner you desire, just be sure to set your jobs up accordingly. They allow you estabish an offset for repeatble excercises quickly and accurately. This becomes important when you want to repeat a job quickly or cycle through different jobs referenced from the home point.
While neither Limit or Homing switches are required it vastly simplifies setup and protects your machine for a relatively small cost. The typical configuration is five switches. Two for the X and Y axis and a single for the Max Z axis. Typicaly the Z min axis is not alarmed since that height is controlled by the job. There are cases where it is needed, such as ensuring the bit never travels through the work to the bed.
Connecting the limit sensor is very easy. There three connections:
Some boards share a max and min port for each axis. This means that when either axis is tripped both the max and min sensor for that axis will alarm. This is a normal function of the controller and not the sensor.
Wire sizes can be 20 to 28 AWG stranded or solid can be used. If you use stranded wire be sure to twist the wire end to simplify insertion into the wire block. Tinning the ends with solder will simplify this especially if you are using 26 or 28 gauge wire. I recommend 22-gauge wire with tinned ends.
Wire removal is accomplished by inserting a small pin such as a safety pin in the hole above the wire to be removed. Once the tension is relieved on the wire it can be removed easily. You can see the video of the process on product page on Tindie.com.