Dr. speaks the truth.
Anodizing is literally controlled oxidization of aluminum by means of electrical current. Dyes are used during the process for color. Then you get into patterns, fades, blah-blah-blah. During my Semi-Pro paintball days I had a small rig setup in my garage for this type of work. It is "sort of like chrome is to steel" in that they both utilize electric current.
As for anodizing a bicycle frame, I do not recommend it. Unless you actually do use "hard anodizing" as you mentioned in your title. Hard anodizing is the name often associated with Type III (a military spec) anodizing. Not many "anodizers" are willing to this type, it can be quite involved.