No, a stye is not contagious. The medical term is "hordeolum"
and it is caused by a plugged and inflamed oil gland in the eyelid.
If it's on the front of the eyelid, it's usually a meibomian gland
that's plugged, if it's on the inside, it's usually a zeiss gland
that's plugged.