A habitat is an environment in which an organism, or group of organisms live in symbiosis.
The environmental conditions on Mars are hostile for humans without life support systems; examples of the factors which make the surface of Mars uninhabitable include the thin, oxygen-poor atmosphere, the lack of easily available liquid water and the extremely cold climate. The habitat of any human visitor to Mars would have to be set of self-contained artificial environments such as buildings, rovers and space suits.
Terraforming has be suggested as a way of making the whole surface of Mars habitable. The more Mars is terraformed, thus increasing atmospheric pressure, the easier it is to built habitats and large domes, eventually huge domes spanning kilometers.
Transhab a concept by NASA to produce inflatable habitats, producing more living space than traditional, solid habitats. This technology has been bought by Bigelow Aerospace, which is developing space hotels with this technology.
Third stage habitat - Tunnel bored habitat (TB-habitat) - Artificial cave
A TB-habitat is a habitat constructed using a tunnel boring machine (TBM). A TBM will have to be specifically designed for this purpose taking weight into account if lifted from the Earth’s surface and landed on Mars´ surface. This will diminish its cutting diameter. Alternatively, it can be made from local resources, allowing bigger diameters.
This type of habitat is a 'third stage' habitat, as opposed to the habitat that will be used by the first party that lands on Mars. That habitat would be categorized as a 'first stage' habitat. And when a permanent ('second stage') settlement has been build, TB-habitats are to be used to expand the settlement subsurface in oder to create really safe living and working rooms.
The approach would be, to drill a grid of intersecting tunnels, each closed of at the ends by a air tight wall or, on occasion, an airlock. Within this grid, sections can be closed of with non-load-bearing walls creating dormitory rooms, workspaces, technical facilities, labs, social hubs, underground greenhouses, and so on.
This approach requires the ability to make shotcrete(or gunite) on location. This means being able to make shotcrete from Martian regolith and available water. It probably will be necessary to strengthen the shotcrete with a spiral, winding steel wire. The tunnel will have to be able to carry the weight of the rock and soil above. And as Martian gravity is less than Earth's gravity, it will be physically less of a stretch to bear the weight.