NaturallyCurly.com explains it as this
Hair is largely made up of a protein called keratin. Cells in the hair follicle regularly produce the keratin and other proteins that become incorporated into the hair shaft. Coloration comes from melanocytes which produce the brown pigment melanin.
The curliness of hair is determined by the amount of disulfide bonds between the hair proteins (bonding between two sulfer atoms -S-S-). Proteins are made of amino acids, two of which contain sulfer — methionine and cysteine. The bonds commonly occur between cysteine residues which have a free sulfhydryl group (-SH). More linking produces curlier hair. The process can also be carried out chemically as happens with a permanent wave. So the main difference between naturally curly hair and straight hair is in the amount of disulfide linking in the hair shaft.
More about hair from Encyclopedia.com: Each hair originates in a deep, pouch-like hair follicle, which contains the bulb-shaped root of the hair. The papilla, a net of nerves and capillaries that supplies the hair, extends into an indentation at the base of the root. Here newly dividing cells force older cells upward, where they die and harden into the hair shaft. The shaft has two layers, the colorless cuticle and the cortex, which contains pigment and the protein keratin. Hair is lubricated by oil from sebaceous glands in the follicle.