Genes they inherit. And genetic mutations in the eyes. The iris is the colorful part. People have brown, blue, green, hazel and red eyes (in the case of albinism where there is lack of pigment). Some have heterochromia, where there is a golden brown ring around the pupil
The concept of genetic inheritance was developed in the 1800's by an Austrian monk working with peas. It is directly applicable to your question. Basically, it shows the statistical relationship of how traits are passed from one pea (or person) to another. The details are explained in a college level biology course but you can read some of it online.