quality:corruption, structural:expansion, structural:reformatting
Habitat and behaviour

A group of oysters is commonly called a bed or oyster reef.

As a keystone species, oysters provide habitat for many marine species. Crassostrea and Saccostrea live mainly in the intertidal zone, while Ostrea is subtidal. The hard surfaces of oyster shells and the nooks between the shells provide places where a host of small animals can live. Hundreds of animals, such as sea anemones, barnacles, and hooked mussels, inhabit oyster reefs. Many of these animals are prey to larger animals, including fish, such as striped bass, black drum and croakers.

An oyster reef can increase the surface area of a flat bottom 50-fold. An oyster's mature shape often depends on the type of bottom to which it is originally attached, but it always orients itself with its outer, flared shell tilted upward. One valve is cupped and the other is flat.

Oysters usually reach maturity in one year. They are protandric; during their first year, they spawn as males by releasing sperm into the water. As they grow over the next two or three years and develop greater energy reserves, they spawn as females by releasing eggs. Bay oysters usually spawn from the end of June until mid-August. An increase in water temperature prompts a few oysters to spawn. This triggers spawning in the rest, clouding the water with millions of eggs and sperm. A single female oyster can produce up to 100 million eggs annually. The eggs become fertilized in the water and develop into larvae, which eventually find suitable sites, such as another oyster's shell, on which to settle. Attached oyster larvae are called spat. Spat are oysters less than 25 mm (1 in) long. Many species of bivalves, oysters included, seem to be stimulated to settle near adult conspecifics.

Oysters filter large amounts of water to feed and breathe (exchange O and CO with water) but they are not permanently open. They regularly shut their valves to enter a resting state, even when they are permanently submersed. Their behaviour follows very strict circatidal and circadian rhythms according to the relative moon and sun positions. During neap tides, they exhibit much longer closing periods than during the spring tide.

Some tropical oysters, such as the mangrove oyster in the family Ostreidae, grow best on mangrove roots. Low tide can expose them, making them easy to collect.

The largest oyster-producing body of water in the United States is the Chesapeake Bay, although these beds have decreased in number due to overfishing and pollution. Other large oyster farming areas in the US include the bays and estuaries along the coast of the Gulf of Mexico from Apalachicola, Florida, in the east to Galveston, Texas, in the west. Large beds of edible oysters are also found in Japan and Australia. In 2005, China accounted for 80% of the global oyster harvest. In Europe, France remained the industry leader.

Common oyster predators include crabs, seabirds, starfish, and humans. Some oysters contain crabs, known as oyster crabs.