Actually the location and appearance of the ulcer is quite
helpful to distinguish between the causes...As mentioned by the
others, there are alot of different causes. Some are more serious
than others. Bacterial infection, parasitic (Entamoeba) infection,
fungal infections and viral infection (especially Herpes simplex)
can all give rise to corneal ulcers. Contamination of contact
lenses is one common problem.
Antibiotics will not work on viruses and fungi, of course, so you
will need specific antifungals and antiviral agents like acyclovir.
Autoimmune conditions that have nothing to do with an infection can
lead to corneal ulcers too...that's why it is important to make the
correct diagnosis. Steroid eyedrops can be used to treat autoimmune
conditions but they make infections worse.
However, in many cases, it is transient and not serious. A corneal
ulcer at the limbus (at the periphery where the black and white
parts of the eye meet) is common due to dry eyes. In a dry
environment (air con room), if you keep staring at your work and
forget to blink or if you have less tear lubrication, you can get a
corneal ulcer but it is always peripheral, not central...a central
ulcer is much more worrying...