If you get a scratch on your eye, you'd better not rub your eyes. Just rinse your eyes with clean water and the scratch will be healed on its own after 3 days. Or you can put a patch over your eye to protect your eye so that your scratched eye can have time to recover. If it still makes you feel pain, you need medical help then.
If it is not serious and you can still see fine, you can use some anti-inflammatory eye drops to prevent it from getting infected. It would be better several days later. If you have blurry vision, you should see a doctor immediately.