As inspector_blakey says, trains are assigned a ten-character number, which is unique over around a 3 month period(citation needed, memory iffy), so for example the PNZ-PAD» sleeper tonight is:
Train reporting number: 1A40
Headcode: 1276
Train ID: 851A40M724
Close, but not quite correct. Firstly, "reporting number" and "headcode" are used interchangeably on the operating railway to refer to the same thing, which is 1A40. In the example above, 1276 is most definitely
not the headcode. Actually I have no idea what it is, unless it's derived from the number you see printed on the bottom of a seat reservation tag, in which case it's purely commercial (ticketing, seat reservations etc) and has absolutely no currency in terms of train operations.
For the sake of completeness, the ten-character ID is made up as follows:
Characters 1 and 2Every railway location in the country used as a timing point (stations, junctions, sidings...) is allocated a five-digit number called, for reasons no-one has been able to explain to me, a
Stanox▸ . As a very coarse rule of thumb, Stanox numbers count up as you go down the country geopgraphically, NW-SE, with the lowest at Thurso and the highest at Dollands Moor. Characters 1 and 2 of the ten-character ID are the first two digits of the Stanox of the location at which the train originates.
Characters 3 - 6Headcode/reporting number.
Character 7A character denoting the type of train: M is used for passenger trains, with other letters/numbers used for different trains depending on whether they're passenger or freight, working timetable or short-term planned etc/
Character 8A letter or number that denotes the scheduled starting time of the train. Every letter and number is used over the course of the day, although the way in which they are allocated isn't 100% logical as some refer to 60 min time periods and others to 30 min intervals, starts off counting 0 - 6, then A - Z, then 7 - 9. In the case of 1A40 the 7 refers to an originating time of 2100 - 2159.
Characters 9 and 10The date on which the train originates (with a leading zero if it's a single digit), so the example above refers to a train originating on 24 Feb.
From this it will therefore be apparent that, assuming the timetable stays the same, a given ten-digit ID will uniquely identify a train within a period of one month, not three. This is overkill however, as the principal use of the ten-character codes is for identifying trains in
TRUST▸ , which only holds data for 9 days before it is archived.
Train reporting numbers (aka headcodes [slightly wrongly]) are only used for timetabling and aren't (really) used on the operating railway in their current form. This is why there can be an overlap between different operators.
I'm not sure what you mean by this but I would argue that that statement is very wrong: I can tell you've never set foot in a signalling centre. The four character headcodes are the basic currency in signal boxes, signalling centres and route controls: you're unlikely to hear ops staff (signallers, controllers, train crews) refer to a train by anything other than its headcode. Although there will in some cases be multiple trains running on the network with a given headcode on one day, great care is taken to separate these geographically and temporally to avoid any possible confusion.