Dermatitis is a generic term that means 'skin inflammation'. Most of the time, when a doctor
says that you have dermatitis they mean that you either have atopic dermatitis (or eczema) or that you have contact dermatitis. Both conditions produce similar symptoms of skin dryness, itching, and redness. However, contact dermatitis is generally related to a chemical or other irritating agent that your skin has come into contact with and atopic dermatitis has no obvious cause.
Impetigo, on the other hand, is a skin infection. Unlike dermatitis, it tends to cause blistering crusting spots on the skin with a yellowish drainage. Because it is an infection, it is extremely contagious and you can spread it to other parts of your skin or pass it to other people if you are not careful to wash your hands and otherwise protect the involved area of skin.
The treatments for impetigo and dermatitis are obviously quite different, as impetigo requires antibiotics to clear up the infection whereas dermatitis generally requires a steroid cream.
I suggest that you talk with your primary care doctor
or your dermatologist
to answer your questions about your skin condition and about what treatments are best for you!