convert terrain to DEM (geotiff)

Does anyone know how I can convert a terrain to a DEM in geotiff format?