They work exactly like the pen mechanism Akai Bukai describes. The 'heart' shaped track is in the plastic of the moving shaft of the switch and a tiny steel spring wire travels around it to provide the latching action. It is exactly the same method as used by most push on/off power switches on dometic equipment.
If this is a mechanism that will operate many times, such as on a motor shaft, beware of the limited number of operations these switches are rated at. They are really intended for manual operation and the end of the shaft is shaped to accept a plastic button cap. For continuous operation it would be more appropriate to use a non-mechanical switch, maybe using optical or magnetic methods.
Brian.