What is coral reef made of?

Stony corals or scleractinians are the corals primarily responsible for laying the foundations of, and building up, reef structures. Massive reef structures are formed when each individual stony coral organism secretes a skeleton of calcium carbonate.

They have tissues but why are they hard? Looks like pure stones.

Each polyp consists of three basic tissue layers: an outer epidermis, an inner layer of cells lining the gastrovascular cavity which acts as an internal space for digestion, and a layer called the mesoglea in between (Barnes, R.D., 1987). This is a structure of a typical coral polyp.