Quite simply, a medication for administration directly to the eye is an ophthalmic medication. It can be an ointment or liquids.
To successfully administer an ophthalmic medication, one should put a (clean) finger on the skin just below the lower eyelash and pull gently down. This creates a tiny sac that the medication can be dripped or squeezed into.
Be careful, if possible, not to touch the tip of the medication to the eye, both to avoid injury to the eye, and to avoid contaminating the medication.