The skin has three main layers - the epidermis, dermis and hypodermis. The epidermis is the outermost layer and provides a protective barrier. It has five sublayers including the stratum corneum. The dermis lies beneath the epidermis and contains hair follicles, sweat glands, vessels and nerves. The hypodermis is made of adipose and connective tissue and contains larger blood vessels and nerves. The skin functions to protect the body, regulate temperature, produce vitamin D, detect sensations and store fat.