Depending on the kind of doll involved, the numbers on a doll's neck can mean either a mold number, a patent number, a date, or it may be some other type of identifier. Not all dolls are made alike and the meaning of the numbers on a doll's neck will vary from doll to doll and company to company. Determining what the number means will usually help to identify what the doll is, how old it is, and the original manufacturer.
The most common meaning of a number on the back of a doll's head is the mold number. The mold number may be simple and as low as two or three numbers in a string. Usually these numbers are purely meant to identify the kind of head mold used on the doll. For instance a doll made in 1923 by a manufacturer may have a certain size and shape and this would be given a mold number. A different doll made in the same year by the same manufacturer will have a different mold number to differentiate the sizes and shapes of the head mold as many dolls may be given similar features.
A patent number will also identify a doll, but it may not help specify the year. Patent numbers may be given to all dolls in a line of dolls that have similar sort of features. Patent numbers may be a mixed combination of letters and numbers or they may be situated near abbreviations on a doll's neck. A patent can last for many years, so a patent number may only help to identify the decade the doll was produced and not whether it was a first edition.
If a doll has a date on the back of her neck it can mean one of two things. Either the doll was made in that year, or the head mold was copyrighted in that year. Barbies, for instance, fall into the latter category. A Barbie with a 1976 stamped on the back of her neck may have been made anywhere between 1976 and the present because Mattel still uses molds they made in 1976 on some of their recent dolls. It is important to look for other identifiers on a doll if you find a date to be sure of exactly how old the doll is.
Other numbers may be something like a product code. These codes may be searchable in doll dictionaries. Product codes can help identify exactly what item a doll is -- the name, the type, the company -- while not necessarily verifying the year. Sometimes there are also size numbers located on the doll's neck that indicate either the size of the doll, the size of the head, or the size of the doll in comparison to the other dolls made by the manufacturer. Sometimes these will be written with a slash, such as "5/0". However, if there was a limited edition of a doll this too may sometimes be written with a slash to indicate which doll of the supply you have. These will usually appear as "23/200", for example, with a large number after the slash that tells how many were made in the limited supply.