A fireplace or hearth is a structure made of brick, stone or metal designed to contain a fire. Fireplaces are used for the relaxing ambiance they create and for heating a room.

Historically, they were used for heating a dwelling, cooking, and heating water for laundry and domestic uses.

Ancient fire pits were sometimes built in the ground, within caves, or in the center of a hut or dwelling. Evidence of prehistoric, man-made fires exists on all five inhabited continents. The disadvantage of early indoor fire pits was that they produced toxic and/or irritating smoke inside the dwelling.

Fire pits developed into raised hearths in buildings, but venting smoke depended on open windows or holes in roofs. The medieval great hall typically had a centrally located hearth, where an open fire burned with the smoke rising to the vent in the roof.

Chimneys were invented in northern Europe in the 11th or 12th centuries and largely fixed the problem of smoke, more reliably venting it outside.

More Info: en.wikipedia.org