Why do I keep on getting an eye stye? How do I stop this from happening?

No actual cause. Styes are spontaneous and occur in the impoverished, the unhygienic and the healthy, clean and wealthy. So you cannot change your lifestyle to prevent them. You probably have some change in your body's resistance that you cannot control. Just treat them with the help of your ophthalmologist as they occur.