Time. Assuming the scratch is on the conjunctiva, it will heal on its own. If it is a large scratch, some people will prescribe antibiotic ointment to prevent infection.
Have it looked at. Injuries to the eye require prompt attention. Although they can heal on their own, it is always safer to have the eye evaluated and treated to prevent infection, inflammation or other long-term problems.