A black eye will normally heal on it's own and go away within 2 weeks.
Typically medical attention isn't needed but you can help the black eye heal faster by applying a cold ice pack to the black eye for a day or two and then you can place a warm compress over the eye to help increase the blood flow.
This will help get rid of the black eye sooner.