All coordinates on a CNC machine are based on it's "home" location, which is the origin of the Machine Coordinate (G53) system. Home switches are used to reference the machine and set this origin point. While not a necessity, they are very useful.
Limit switches tell Mach3/Mach4 that the machine is at the physical limit of axis travel. If a limit switch is triggered, it disables the motion of the machine.
Soft Limits are the same as hardware limits in that they limit an axis from traveling too far. This is accomplished entirely in software by Mach3/Mach4 monitoring the machine position and keeping it within the specified bounds.
In Mach3, setting up Soft Limits is fairly simple. They are based on Machine Coordinates so having a consistent Homing strategy is vital. The extents of the Limits are defined by the Min/Max settings under Config > Homing/Limits (as coordinate values). The easiest way to determine what the Min/Max values should be is to Home the machine, move each axis to its furthest extent, and see what the values are (by clicking on the Machine Coords button on the Program Run screen). Those values, along with 0, make up your Min/Max (ie. if X is 0 at one end of travel, and -43 at the other end, then your Max will be 0 and your Min will be -43; if Y is 0 at one end and +20 at the other, then your Max will be +20 and your Min will be 0).
Section 4.5 of the “Mach3Mill Install and Config Guide” discusses home and limit switches in more detail, while Soft Limits are discussed in Section 220.127.116.11.
In Mach4, the process is very similar. Check out the support video below for a step-by-step guide, as well as a script you can use to enable soft limits automatically after homing.