The skin has two main layers: the epidermis and the dermis.
Epidermis: The Outer Layer
The epidermis is the outermost layer of skin. It's a protective barrier against the environment, preventing water loss and protecting against infection. This source details its structure and function. The epidermis is comprised of multiple sub-layers, but for simplicity, it's considered a single layer when discussing the two major skin levels.
Dermis: The Middle Layer
The dermis lies beneath the epidermis. It's thicker than the epidermis and contains blood vessels that supply nutrients to the skin, hair follicles, sweat glands, and nerve endings. The dermis provides structural support and elasticity to the skin. This source explains the dermis' role in providing blood supply to keep the skin healthy. It's important to note that while the subcutaneous tissue lies below the dermis, the question specified only two layers of skin.
Several sources confirm this two-layer structure, including the statement that "The epidermis and the dermis are the top two layers of skin in your body" (https://my.clevelandclinic.org/health/body/21901-epidermis). Another source states that "the two main layers which serve a number of important functions. These layers are called the epidermis (the outer layer) and the dermis (the middle layer)" ([Reference material provided]).