I've gotten a small pain in my eye for a week or so now, but I woke up this morning and it's swollen shut, puffy, and red. Is it a stye?

Possibly. Your symptoms could be due to a stye. But a corneal abrasion, corneal ulcer, or foreign body (embedded foreign material) can also cause similar symptoms. The best course is to see an eye doctor immediately for a diagnosis and to start treatment.