Most Japanese and Korean martial arts taught in North America use a colored belt as a ranking system. Belt-using styles include hapkido, taekwondo, karate, and judo. Advanced students and masters have a black belt; students who have not yet earned their black belts wear a belt of some non-black color (red, blue, yellow, purple, etc.) Complete beginners start with a white belt, and in most color belt systems as the students progress the colors they wear become closer to black.
There is a much-debated legend about how the colored ranking systems got started. The story goes like this: before the 20th century, all martial arts belts were uncolored raw cotton or silk. As a student worked at his art, the belt became darkened from sweat and incidental dirt. Students were neither permitted to place their belts on the floor, nor to clean them. So, by the time the student became a master at his art, his belt was thoroughly blackened.
The other possibility is that colored belts were adopted for the non-black ranks because they look cool and are appealing to students.
In general, for the martial arts styles that use the belt system, the ranks fall into two categories.
The advanced ranks that wear black belts are called dan ranks. There are generally ten degrees in within the black belt with 1st dan being the least advanced.
The non-black, beginning student ranks are called kyu (pronounced "cue") in the Okinawan and Japanese systems, kup ("cup") in the Korean systems, and sidai ("see-dye") in the relatively few Chinese styles that use the system.
In most styles, a diligent student can progress to 1st dan in two to five years; much of their progress will depend on their attitude as well as their physical talent.
Doughbelly says Jigaro Kano, the founder of judo, got the idea for color belts as a reward to keep children motivated. He got the colors from different colored swimming caps used in Japanese grade school swimming classes to sort out the swimming ability of children. The white belt getting black over time is a myth that has taken on a life of its own over time. And originally, color belts were meant for children and just children. Even now, many traditional ryus and dojos in Japan stick to white-brown-black for adults, if not just white-black.