Cabbages produce seeds from flowers but you don't usually see them do it because it takes more than a year. If you want to get your own seed from your cabbages, choose open-pollinated varieties rather than F1 hybrids, so they'll breed true. Cabbages cross easily, not only with other cabbages but with kale, kohlrabi, cauliflower, broccoli, collards and Brussels sprouts, so you'll need to protect your seed cabbages if other plants of the same species are blooming within 1,000 feet.
Plant your cabbage to mature as late in the fall as practical. Choose the best dozen heads to use for seed. If your winters are mild, rarely getting more than a few degrees below freezing, cover the heads with straw or other loose mulch to protect them from freezing. If your winters are severe, pull them up with roots intact and store them in a root cellar or bury them under at least a foot of dirt and mulch, deeper in the coldest climates. You want them to be kept cool but never frozen solid and damp enough so they don't dry out but not so damp that they mold.
Dig up or uncover the cabbage heads when the danger of hard freezing is past. Plant or transplant them 1/12 to 2 feet apart, spaced in a square or grid rather than a row if you'll need to protect them from cross-pollination. Plant them deep so the heads are at ground level. Cut an "x" in the top of each head, about an inch deep, to let the flowering stock emerge easily.
Set poles upright around the cabbages about 4 feet high and connect the tops with wire or heavy cord. When the seed stalks emerge in early summer but before they bloom, cover the framework with netting that's woven tightly enough that bees can't get through. When the flowers open, raise the cover long enough each morning to allow bees to enter and let them stay inside to pollinate the plants, then raise the cover to release them. Repeat while the plants are blooming, then remove the covering while the seeds mature. If no other plants that cross with cabbages are blooming at the same time within 1,000 feet, you can omit the protection and just let bees come and go to pollinate them naturally.
Tie the seed stalks loosely to poles to keep them from bending or breaking in strong wind or rain as the seeds mature. Wait several weeks for the seeds to ripen.
Pick the seedpods when they first turn brown, before they burst open and spill their seeds. Some mature before others, so pick them every few days. Lay them on a tray in the sun to finish drying. If you don't mind losing some, you can wait until the majority have turned brown, cut the whole seed stalk and lay it on a tray or sheet to dry. For the most viable seed, let the pods mature as long as possible on the plant.
Put the pods in a cloth bag and lightly pound it or crush it to knock the seeds loose, then carefully pour them out. Use a coarse sieve to separate them from larger debris or pour them from one container to another in a light breeze to let the lighter pieces of broken pod blow away. Keep the seeds in a dark, dry place until you want to plant them. They should keep several years.