A cemetery reduces the happiness loss of a dead citizen's family. There must be space in at least one cemetery upon death for this effect to be applied. If there are no cemeteries, or if all cemeteries are full, they’ll be much sadder for a while, but they’ll head back toward normal happiness after a few years.
The townsfolk like to visit places of interest in their idle time, and the cemetery is one of these. People that live near a cemetery also get a happiness boost.
A cemetery must be built on flat land and must be between 7 and 20 units long in each dimension.
Tombstones eventually decay and disappear after approximately a generation, allowing the reuse of cemetery plots.
Unlike other structures, if you destroy a cemetery, the walls around it will be taken down – but the tombstones won’t disappear. The player has to wait for the natural decay of the tombstones before that space can be utilized for something else.
It is the sixth item in the Town Services category, accessed via the sixth button on the interface bar. Hotkey: F6,6
Here are tables with Costs and number of graves for each cemetery size: https://docs.google.com/spreadsheets/d/1brX36N8UBwX4PtnPAH0y75PIXs_xr8OQ59tUVyXhNSk/edit?usp=sharing
You might get confused with the tables if you play with the map rotated though, so be cautious.