Black polythene, known in the trade as Black Mulch, is available from horticultural suppliers in various widths lengths and thicknesses. I get 200 hundred metre lengths, a metre or so wide.
The ground needs to be properly prepared. It should be moist but not waterlogged; friable and of a fine tilth. It should be fairly firm for brassicas, but light and well aerated for other crops. Before laying down poly you should have added fertiliser; I use fish, blood and bone, at the rate of a couple of handfuls per square yard. Sometimes it is wise to sprinkle a few organic approved slug pellets over the ground to deter slugs and snails which can decimate beans and brassicas. These creatures relish the moist well protected conditions under poly. Ants often build nests under black poly as the ground warms up in summer and especially if you allow it to get dry. If you must kill them, sprinkle ant killing powder into the nests. Personally, I only find ants a problem if they build their nests amongst the roots of plants. I usually leave them alone unless the plants are obviously suffering.
If you are laying single rows of black poly, one can anchor the sheets with stones placed around the edges. This is especially easy if you have raised beds. Otherwise, dig a shallow trench between sheets and bury the polythene with the soil dug. This is useful because rain water collects in the trenches and seeps under the poly. Always lay your poly across the slope of your garden to allow water to drain into the soil.
Interestingly, even if there is very heavy rain I find the ground under polythene never gets water logged. It stays in wonderful condition for months.