Cut a section from the cactus using a clean, sharp knife. Place the cut section in a cool, dry place out of direct sunlight. Allow the cut end of the cactus to dry and form a solid protective surface, like a scab forming on a cut on your skin. You can then plant the cut section from the cactus in an inch of moist soil and it will root.
It takes between two and three weeks, depending on the ambient temperature and the amount of moisture in the air, for the scab to form completely on a cactus cutting. The initial drying can be done in only 24 hours if a fan heater is used to dry the cactus, but even with this speedier approach, the cactus must then rest for two weeks to recover from the sudden drying.
Cacti, like all living creatures, are susceptible to disease. You must therefore ensure that the knife used to cut the cactus is thoroughly cleaned before use, preferably sterilized or cleaned in rubbing alcohol to reduce the number of germs and potential infections present to an absolute minimum.
Cutting the cactus does not always result in a successful rooting. If the cactus is diseased and you cut away what appears to be a healthy part of the cactus to reroot it elsewhere, it is possible that you have taken part of the infected cactus as well, so the cutting will die. A cactus that is low on nutrients may also not be healthy enough to survive the cutting. Cuts must be made with care.