How did it vary across the globe in different cultures?
So, identification in Classical Athens, in the space of a reddit comment:
Being able to prove that someone is (or isn't) who they say they are crops up quite a lot in classical Athenian legal speeches. Often that's because there is a dispute over inheritance, where one claimant claims that the other isn't the legitimate heir. For instance, in Isaeus' eighth speech, On the Estate of Ciron, the speaker claims to be the grandson of Ciron, and hence have a greater claim to his inheritance than the nephew who did in fact inherit.
Being able to prove that someone is an Athenian citizen was also important in Athenian law, as citizens had a whole bunch of rights that non-citizens didn't, including being able to own property in Athens, take part in Athenian politics, have one's children become Athenian citizens*, and to marry an Athenian citizen. (Relatedly, it was also sometimes necessary to prove whether or not a marriage had taken place. If I have the space in this comment, I might discuss that a little too).
How, then, did an ancient Athenian prove his or her identity? Well, perhaps obviously many modern forms of proof of ID were not available. There were no birth certificates or marriage certificates. There were no passports or government-issued ID cards. Photographic and biometric (e.g. fingerprints) proofs of identity obviously didn't exist. So what was left? Well, it depended on whether you wanted to prove the identity of a man or a woman or a child.
Men were in some ways the easiest. An Athenian citizen man would have been registered in phratries (at birth) and demes (on attaining majority). We're not really sure what phratries did, but demes were geographical groupings for which registration was required in order to be accepted as an Athenian citizen. Registration into these groups involved being sworn in, with your father testifying that you were their legitimate son. Having been accepted by phratries and demes as citizens, and having gone through the "rigorous scrutinies that preceded registration with these bodies" (Kapparis 1999, p.34), counted as evidence that a man was an Athenian citizen.
It was harder to prove that a woman was a citizen.*** Women weren't registered with phratry or deme, so that was out. Essentially, then, it basically had to be assumed that a woman was who her father said that she was (Noy 2009, p.402). If the question came to court, and the father's word wasn't enough, then other relatives could testify (as happens at Demosthenes 57.68), as could others who knew the family well (e.g. members of the same deme in Dem. 43.35). Slaves could testify, but only under torture, and in practice the owners of the slaves didn't usually consent to this. Finally women, though they couldn't testify in court, could swear an oath elsewhere which could be submitted for evidence in court (which happens in Isaeus 12.9).
Marriage, too, couldn't be proved by marriage certificate. Evidence here essentially boiled down to whether a couple acted like they were married. Witnesses could testify that, for instance, a dowry had been paid, or the gamelia (a feast marking a wedding) had been celebrated. Other things that a husband might do for a wife, such as carrying out funerary rites for her on her death, could be given as evidence for a marriage (cf. Isaeus 6.65).
* Prior to 451, an Athenian father was sufficient for Athenian citizenship. After 451, both parents had to be Athenian.
** Sometime between 451 and 340 BC, it became illegal for an Athenian to marry a non-Athenian. We know this because the pseudo-Demosthenic speech Against Neaera is the prosecution speech in a trial for exactly this crime, and it can be dated to no later than 340.
*** Or at least legitimate Athenian woman: some classicists have argued that women were not considered citizens. See for instance Nicole Loraux, Children of Athena.
Sources
There is actually a very interesting story of mistaken (or not) identity in the early 16th century. It is told in The Return of Martin Guerre by Natalie Zemon Davis. It furthermore ignited a debate between the author of the book and fellow historian Robert Finlay. He wrote a review entitled "The Refashioning of Martin Guerre." Davis then responded with "On the Lame."
The above case, however, is not one of common identification but of a man long thought dead. In the case of Martin Guerre the man proved his identity by giving his knowledge of "himself" to those who knew him.