sty1

[stahy] /staɪ/
noun, plural sties.
1.
a pen or enclosure for swine; pigpen.
2.
any filthy place or abode.
3.
a place of bestial debauchery.
verb (used with object), stied, stying.
4.
to keep or lodge in or as if in a sty.
verb (used without object), stied, stying.
5.
to live in or as if in a sty.
Origin
before 1000; (noun) Middle English; Old English *stī in stī-fearh sty-pig; probably identical with stig- in stigweard steward; cognate with Old Norse stī, Dutch stijg, German Steige

sty2

[stahy] /staɪ/
noun, plural sties. Ophthalmology
1.
a circumscribed abscess caused by bacterial infection of the glands on the edge of the eyelid; hordeolum.
Also, stye.
Origin
1610-20; by false division of Middle English styanye sty (styan (Old English stīgend sty, literally, rising) + ye eye), taken to be sty on eye
British Dictionary definitions for sty

sty

/staɪ/
noun (pl) sties
1.
a pen in which pigs are housed and fed
2.
any filthy or corrupt place
verb sties, stying, stied
3.
to enclose or be enclosed in a sty
Word Origin
Old English stig; related to Old Norse stīa pen, fold, Old High German stīga, Middle Dutch stije

stye

/staɪ/
noun (pl) styes, sties
1.
inflammation of a sebaceous gland of the eyelid, usually caused by bacteria technical name hordeolum
Word Origin
C15 styanye (mistakenly taken as sty on eye), from Old English stīgend rising, hence swelling, stye + ye eye
Word Origin and History for sty
n.

"pen for pigs," Old English sti, stig "hall, pen" (in sti-fearh), from Proto-Germanic *stijan (cf. Old Norse stia "sty, kennel," Old High German stiga "pen for small cattle").

"inflamed swelling in the eyelid," 1610s, probably a back-formation from Middle English styany (as though sty on eye), mid-15c., from Old English stigend "sty," literally "riser," from present participle of stigan "go up, rise," from Proto-Germanic *stig- (see stair).

sty in Medicine

sty or stye (stī)
n. pl. sties or styes (stīz)
Inflammation of one or more sebaceous glands of an eyelid. Also called hordeolum.