As their name suggests, tankless water heaters heat up water without the need for a tank.
Inside the heater, cold water is passed through a heat exchanger, which itself is warmed by a burner beneath. When water exits, it is hot. To control the temperature, cold water can be added back into the stream once it has exited the device.