In Modern English, they is a third-person pronoun relating to a grammatical subject.
In Standard Modern English, they has five distinct word forms:
they: the nominative (subjective) form
them: the accusative (objective, called the 'oblique'.) and a non-standard determinative form.
their: the dependent genitive (possessive) form
theirs: independent genitive form
themselves: prototypical reflexive form
themself: derivative reflexive form (nonstandard; now chiefly used instead of "himself or herself" as a reflexive epicenity for they in pronominal reference to a singular referent)
Old English had a single third-person pronoun hē, which had both singular and plural forms, and they wasn't among them. In or about the start of the 13th century, they was imported from a Scandinavian source (Old Norse þeir, Old Danish, Old Swedish þer, þair), where it was a masculine plural demonstrative pronoun. It comes from Proto-Germanic *thai, nominative plural pronoun, from PIE *to-, demonstrative pronoun. By Chaucer's time the th- form has been adopted in London for the subject case only, whereas the oblique cases remain in their native form (hem, here < OE heom, heora). At the same period (and indeed before), Scots texts, such as Barbour's Bruce, have the th- form in all cases.The development in Middle English is shown in the following table. At the final stage, it had reached its modern form.
Singular they
Singular they is a use of they as an epicene (gender-neutral) pronoun for a singular referent. In this usage, they follows plural agreement rules (they are, not *they is), but the semantic reference is singular. Unlike plural they, singular they is only used for people. For this reason, it could be considered to have personal gender. Some people refuse to use the epicene pronoun they when referring to individuals on the basis that it is primarily a plural pronoun instead of a singular pronoun.
In December 2019, Merriam-Webster chose singular they as word of the year.