Typically, to obtain a doctor of medicine or "MD" degree, a 4-year curriculum is required as a medical student. Tuition varies widely.
To complete internal medicine or pediatrics training, a 3-year residency is required. This is after the 4 years of medical school as above, and does include pay and benefits. Pay is typically $35-45k a year during this training.
Additional training in allergy is required. This is called a fellowship. Some programs are two years and some programs are three years. Pay during this training is comparable to residency.
So, 4 years of medical school, then six or seven of additional training, which consists of residency and fellowship.