The stye is due to the blockage of gland of the eye lid.
When it becomes hard you need to give warm compression for 10-15 minutes.
Application of warmth soften the area and rupture the blocked gland.
If it does not help it may need drainage by a small incision.
You have to contact doctor for further management.