Propagating a cactus is easier than you think. Many species produce side shoots, or you can cut off a piece and let it root again.
The most important thing: let it callus over
The biggest mistake is putting a freshly cut cutting straight into soil — it will rot. First let the cut dry for a few days to a week until a dry layer (callus) forms over it. Only then should you plant it.
Step by step
1. Cut off a side shoot or a piece with a clean, sharp knife (wear gloves to protect against the spines).
2. Place the cutting in a dry, airy spot to form a callus.
3. Place the callused cutting in dry cactus potting soil.