The arteries supplying the corpus cavernosum (erectile parts) are in the middle of each of the two erectile parts. The veins draining them are at the outside (although not the veins you can see). Quite little pressure constricting the veins has quite a significant effect on quality of erection. What normally happens without a cock ring is the swelling of the corpus cavernosum actually compresses the veins, amplifying the effect of extra blood coming in by blocking the blood leaving. A cock ring helps to start this process. You might even find you can take the cock ring off once you're hard, and the corpus cavernosum pressure will continue to block the veins sufficiently to maintain a good erection once it gets to that point, but you can leave the cock ring on for a max of 30 minutes.
Sometimes in older age or as a consequence of loss of testosterone for a long period (e.g. hormone therapy), an erection failure mode known as veinous leak can happen, and that's when blood does leak out through the veins in sufficient quantity to stop enough blood and pressure building up in the erectile parts.
Note that a cock ring is very different from a vacuum erection device constriction ring, which is designed to be tight enough to constrict both the arteries and veins.
You can put a cock ring around either the base of the penis, or around the base of the penis and scrotum - both are effective. I wouldn't suggest using twine or string though - something that's inelastic could quickly get very nasty if your erection takes hold, as it should. It can also be a bit painful extracting a cock ring from inside a forest of pubes, where you'll probably end up plucking some pubes in the process.