Each strand of hair contains three layers: the cuticle, medulla, and cortex.

Hair 101: An interesting compilation of hair facts you would learn in beauty school.
The cuticle is the outermost layer. It contains hard, shingle-like cells that form from dead cells that overlap each other. Its purpose is to protect the inner layers and give the hair strength. The shape the cuticle is in determines how healthy your hair is. Healthy, shiny hair has a smooth cuticle, but damaged hair has scales that are raised. You can smooth the cuticle down by using mild heat (like a towel wrapped around your head after you get out of the shower) or acidic based hair products.
Hair 101: An interesting compilation of hair facts you would learn in beauty school.

The next layer, in the middle of the hair shaft, is the cortex, which makes up most of the actual hair. Melanins, which are color pigments, are located here in the cortex. They determine the color of the fiber of the hair, based on how many melanins there are and what types they are.

The shape of the hair follicle determines the shape of the cortex, which therefore determines if hair is straight, wavy, or curly. The cortex also holds water and is packed with keratin protein. The process of coloring, perm/straighteners or other styling all takes place in the cortex.

The innermost layer of hair is called the “medulla,” although some people (with fine hair) don’t have a medulla.