Corals build themselves homes of limestone in the warm, clear, shallow seas of the tropics. Their reefs occupy less than one tenth of one per cent of the ocean floor, yet they are home to a quarter of all known marine species. They are complex, infinitely varied structures providing all kinds of homes for their many residents. There is fierce rivalry for space, for food and for a partner, but the reef is also a place full of opportunity. For those that manage to establish themselves, there can be great rewards.

The broadclub cuttlefish has found its place by using a hypnotic display that apparently mesmerises its prey, causing it to let down its defences. On the Great Barrier Reef a remarkable grouper uses sign language, dubbed the headstand signal, to reach out to an entirely different creature, a reef octopus, to flush small fish out of their hiding holes and into the groupers waiting mouth.

While they might appear to be nothing more than rocky substrate, each coral is in fact made up of hundreds to thousands of tiny, living coral creatures called polyps. Filmed with super macro time-lapse, we bring them to life and reveal their hidden worlds. As these polyps grow and die they lay the limestone foundation for civilisations and superstructures so large that they can be seen from space.

Coral reef cities never sleep, they are constantly noisy worlds where a chorus of submarine song rings out from their many inhabitants. At dawn, one of the reef's most charismatic inhabitants, the green turtle, heads off to be cleaned at a special health spa. As she approaches the station, she is joined by more of her fellow turtles and is pushed out by the queue-jumping males. She must wait for her opportunity to sneak back in.

Some animals come to reefs for rest and relaxation. In the desert sands of Egypt, coral reefs thrive in the shallows of the Red Sea, providing bottlenose dolphins with a place to rest. For the youngsters, the reef is their playground. These dolphins play by balancing corals and sponges on their nose and in doing so build important life skills.

Every reef has a sharply defined boundary. On the outer side, facing the open ocean, is the drop-off. These ramparts protect the city from the ocean waves, but twice a day the walls are covered by the incoming tide. In the Bahamas, the rush of the water creates a truly strange phenomenon - a whirlpool. In the Maldives, on the biggest tides, one particular coral lagoon becomes so flooded with plankton that it attracts hundreds of manta rays.

On the sheltered side of the reef there are sand flats which provide rich feeding grounds. However, away from the protective structures of the reef there is nowhere to hide. This makes it a dangerous place, especially at night when predators patrol in search of prey caught in the open. The bobbit, a giant carnivorous worm, buries deep in the sand in order to ambush unsuspecting prey. But there is safe accommodation for some out here in these sandy suburbs. An extraordinary species of clownfish has made a home in an anemone away from the reef. But it is up to the big male to find a way for the female to lay her eggs.

Reef creatures go to great lengths to give their young a head start in life and nowhere more so than on the remotest reefs in the world. In French Polynesia, thousands of grouper risk death when faced with hundreds of grey reef sharks in order to reproduce.

Despite their longevity and resilience, increasing ocean temperatures have put coral reefs under unprecedented pressure. The most devastating bleaching event known in recorded history wreaks havoc on the Great Barrier Reef in Australia. Without the three-dimensional structure of a coral reef, all reef dwellers are affected. The programme unfolds with one of the greatest mass-spawning events in the oceans - corals, fish and invertebrates all releasing a snowstorm of eggs. By sending their young away from the reef, there is hope that they will regenerate new reefs and secure their future for generations to come.