Finely chop your cabbage, then add 1.2% - 1.5% salt (12g - 15g per 1kg chopped cabbage). Put in a bowl with whatever spices you like (cumin, dill, mustard seed…) and knead until you get a fair amount of liquid - enough to cover your cabbage when it's compressed in your bowl.
Now fill the kraut into glass jars and keep pressing new layers into your glass jar (large pickling jars are good). Make sure that it's not filled completely to the top, but that you cover the last bit with some of the liquid. Put a bag made from cling film filled with baking beans on top to keep the sauerkraut submerged.
Remove and foam from the top daily. If there is green foam, chuck the whole lot. The foam should be white.
After about 6 days, the fermentation should be far enough advanced that you can remove the last bit of foam and tightly close the lid, and put the jar into the refrigerator. Now wait for at least 2 weeks, and the Sauerkraut is ready for consumption.
This is not the traditional way (done in an earthenware pot with muslin, weights, etc., but it's a lot easier and works just as well.