$VersionNumber is a real number which gives the current Mathematica kernel version number, and increases in successive versions.
To find out if you are running under Version 4 or above, you can use the test TrueQ[$VersionNumber >= 4.0].
A version with a particular number is typically derived from the same source code on all computer systems.
See The Mathematica Book: Section 2.13.5.
See also: $ReleaseNumber.