sty / stye are similar-sounding terms with different meanings (referred to as homophones). To better understand the differences, see below for definitions, pronunciation guides, and example sentences using each term. 👇
sty: (noun) an infection of the sebaceous gland of the eyelid. (noun) a pen for swine.
stye: NA
sty: s·t·AY
stye: NA
(Examples are Wikipedia snippets under the CC ShareAlike 3.0 license. Definitions drawn from WordNet.)