The best way to find out what your problem is, would be to go to an ophthalmologist for evaluation. It sounds like you have an internal stye. A stye is an infection on the eyelid that needs to drain and be treated with antibiotic eye ointment or drops. In the meantime, apply hot compresses to your eye as often as possible, with breaks in between, to try to drain the stye. You will need a prescription antibiotic ointment from the doctor as well.
It makes it difficult because I can't see it, but I have a history of styes and had one as you describe. It is called internal because when the stye is unable to drain it backs up and forms that channel. Frequent hot soaks to the eye to get it to open and drain at the lid is what is done to relieve it. Antibiotic ointment is then applied because a stye is an infection.
You can get a definitive diagnosis from the doctor.