You need to see an ophthalmologist right away since you could have an abrasion that could easily get infected from a dirty fingernail.
Your eye is just probably inflamed. It may take a while, but it will die down. Try putting an ice pack on it. If it persists, make sure your cornea/sclera is not damaged/scratched.