Which type of doctors treats autoimmune diseases?

Depends on disease. That depends on the type of disease. Primary care doctors may be able to treat most of them. Endocrinologists specialize in autoimmune thyroid disease and type 1 diabetes mellitus. Ophthalmologists specialize in autoimmune eye diseases. Immunologists specialize in diseases from low immune system function. Rheumatologists specialize in systemic diseases due to increased immune system function. Etc.
Rheumatologists. Rheumatologists treat most autoimmune diseases. Diseases that only affect 1 part of the body may be treated by other specialists, as in crohn's (gastroenterologists) MS (neurologists) or psorias (dermatologists).