It is hard to say, the superficial keratitis could heal by itself, but the severe ulcerative keratitis is an extremely serious situation, which need see a doctor immediately. The time of recovery depends how severe the keratitis is, which could be several days or months. You'd better see a doctor if you get keratitis to make sure whether it is serious or not.
Well, generally speaking, the keratitis can not heal it by itself. And you need to take some measures to treat it. As we know that keratitis is the general term for anything which causes the surface of the cornea to breakdown. So it can be contagious. So just be careful about it. To treat it, antibacterial, antifungal, or antiviral therapies which can treat the infection are usually used. For These treatments, it can involve prescription eye drops, pills, or even intravenous therapy. Besides, if you are wearing contact lenses, you are not supposed it again, for it can just make the situation worse. Anyway, it can take about it one week to cure it.
From what I know and some people around me, some people , if they are lucky enough and their keratitis is not that serious, their keratitis is possible to be cured without treatment. However, most of them would suffer a lot if not treated on time. Generally speaking, if the situation is not very bad and you take effective measures , it would take only 2 or 3 weeks before you fully recover.