Singular they is used to attempt to remedy the deficiencies of English pronouns. English has he and she as third person singular pronouns, but it lacks a pronoun which does not imply gender. Traditionally he has been used to refer to a person of either gender, but today such use is widely frowned upon as excluding women. He or she can be used, but this is a rather torturous expression. English also has the singular neuter pronoun it, but this pronoun is only used for inanimate objects, or sometimes animals or newborn infants; its use to refer to humans sounds rather jarring.
Note that while singular they is semantically singular, it is syntactically plural; thus the singular they takes plural verb forms. While this may seem odd, it is no different from the use of you, which always takes a plural verb form, whether one is addressing one or several persons.
The singular they can only be used to refer to an indeterminate person; it cannot generally be used to refer to a person identified as a particular unique individual, even if that person's gender is unknown.