My eye has been hurting for about two weeks. It gets pus in it and my vision has been blurred what can this be?

Urgent Ophtho. The constellation of visual change, eye pain, and apparent pus in the eye can represent dangerous bacterial infections. Rarer but also serious problems, like uveitis, are also possible. Eyes with these symptoms need to be examined promptly at least by a pcp and likely by an ophthalmologist.
Conjunctivitis. An eye that is painful with pus like discharge and symptoms of blurred vision isn't normal and can be a sign of infection and inflammation. This could be serious and can get much worse if not evaluated and treated soon. Please see a doctor as soon as possible to prevent any worsening of your condition.