One number, counted from 1970
A Unix timestamp is the number of seconds elapsed since 00:00:00 UTC on 1 January 1970, known as the epoch. Because it is a single integer with no timezone, no calendar and no formatting, it is the standard way to store and transmit an instant in time — every conversion to a human-readable date happens at the edges of a system.
Seconds or milliseconds
The convention splits by language. C, Python, PHP, Go and most databases use seconds; JavaScript and Java use milliseconds. Feeding a millisecond value into something expecting seconds throws the date roughly 50,000 years into the future, which is the single most common bug in this area. The converter detects the difference by magnitude — anything at or above 100,000,000,000 has to be milliseconds, since as a seconds value it would be more than five thousand years from now.
The year 2038 problem
Systems that store the timestamp in a signed 32-bit integer run out of room at 2,147,483,647 seconds, which falls on 19 January 2038 at 03:14:07 UTC. The next second wraps to a negative number and reads as December 1901. Most modern systems have moved to 64-bit values, which pushes the limit far beyond the lifetime of the Sun, but embedded and legacy code remains exposed.
Leap seconds are not counted
Unix time deliberately ignores leap seconds: every day contains exactly 86,400 seconds by definition. This keeps the arithmetic simple — you can divide by 86,400 and get a day number — at the cost of drifting slightly from true astronomical time. It also means a timestamp is not quite the count of physical seconds since 1970, a distinction that matters only to timekeeping specialists.