I usually plant mine in good soil with a handful of "blood and bone" fertilizer and hand-water as necessary in the evenings. Generally speaking when the potato is flowering the tubers are still forming but I've found sometimes a mature enough potato, even if still flowering, will supply a reasonable quantity of early potatoes.
Sometimes tubers grow at the top of the plant near the soil surface so to prevent greening it is necessary to cover them up. This can be done by "hilling them up" with earth by just using a shovel or even a hoe or machinery if the rows allow. Another option is to cover them in straw.
In the garden we've often had crops of 3 kg or more from some of the main crop plants, and single tubers weighing 1 kg or more each, so they really can be quite prolific.
Photos from the potato patch at Kewmarnic Cottage: