The sand is hot and is being warmed by a flame underneath. Coffee and water is put into the metal container and is boiled using the sand to conduct heat. The "filling" you see is just the coffee (which is thicker and stronger than american coffee, due to the grounds being left inside) is just the coffee boiling up. The turkish use sand because it is easy to control the amount of heat being transferred into the coffee.
You either work to death in one go or just simply die of the shock.