More information needed.
Is this a one off or are you having recurrent styes?
It should go away without medical advice, but Ibuprofen 400mgms for the pain or discomfort and a warm pad held over the eye four times a day for about 10 mins which will bring the stye to a head and burst.......may take up to a week.
In some cases, barley requires minimal surgical intervention by an ophthalmologist, followed by the appointment of drugs or antibiotics. Your doctor may recommend a very simple operation to open the stye.