Shyness is closely associated with anxiety. Its cause can be a kind of "chicken-and-egg" problem in that sometimes shyness seems to originate with a physical anxiety reaction, while other times it seems to develop first and then it becomes the cause of the physical symptoms of anxiety.
Especially children are sometimes shy towards strangers. This varies greatly with the child, and can also quickly disappear when the child starts feeling at ease.
Somebody may be just shy in some regard. For example, a heterosexual may be shy towards somebody of the opposite sex. Or a performer who is not shy at all on stage may be shy in an interview or in his or her personal life.
A shy child may lose much of his shyness as life passes, but usually he or she always retains some tendency or inclination toward shyness.
While shyness is somewhat of a drawback, the opposite, boldness, can go too far also, e.g. impertinently asking favors or causing other inconvenience. Feigned boldness as a compensation for shyness can have the same problem.
See also: Love-shyness