For example, netbeans has versions like 6.9.1; 7.0.0; 7.1.1 etc. Does the second number in the hierarchy mean improvement and the first is more about introducing new functionality, which makes it more likely to have bugs. So how do I interpret these version numbers, especially if I am willing to get the most stable version?
3 Answers
In the general case, version numbers have no fixed semantics. A common convention is to use a "major" version number to signify major changes, and "minor" version numbers to signify small changes, but this is not cast in stone. The recent release of Linux 3.0 is a good illustration -- the major version number was incremented purely for PR value; the release was no more significant than earlier releases in the 2.xx series.
Some projects have a stable / unstable convention; odd-numbered minor version numbers are development versions, and the even-numbered minor versions are release versions. The Linux project uses this convention, as do Gnome and various other open source projects.
TeX has a playful version numbering convention of its own; it goes from 3.14, to 3.141, to 3.1415, to 3.14159 etc. (Hint: pi.)

- 175,061
- 34
- 275
- 318
Each product has to describe its own version number policy.
For instance, Netbeans allude to it in its Guidelines
Usually:
- the third number means: "bug fix only, no API evolution", and you can see it when checking API changes for 7.1.1, or for 7.1.2
- the second number means "API changes, but still backward compatible": see 7.1 release
- the first number is for "API changes, possibly not compatible with the previous versions": see 7.0 release.
You can have deprecated API fully removed, existing API modified, ...
A migration guide is involved.
Lots of other versioning policies exist out there.
See:
The official document on such policies is in semver.org: Semantic versioning.