Sweat is produced in the sweat glands which are located in the dermis layer of the skin. Sweat is formed when the body heats up and the body needs to cool down. The sweat glands secrete a salty liquid called sweat. The sweat helps to regulate body temperature as it evaporates and cools the body.