Introduction
phpBB follows a specific system for versioning it's releases. A version identifies a release. The version number is in the format y.x.z(a). This system is based on the unix kernel versioning. (x, y and z represent numeric digits, the "a" component is alphabetic and optional).

Major version Number (X)
The major version number is increased when your project is completely rewritten. For example the change from phpBB 2.0.x to 3.0.x. The complete codebase changed.
Minor version number (Y)
The minor version number is increased for semi-rewrites. In this case the codebase of the previous version is kept, but extended very strongly. This is the tricky part though. Instable releases are always odd. The odd number is always the development version of the next even number. More about that in the development section.
Revision version number (Z)
The revision version is only for very small changes. Depending on project size it can also be a lot of code that is changed, but it's only bug and security fixes, and sometimes new features.
Release version number (a)
The release version is basicly for messed up revision releases. You release a new revision of a mod, but then you notice a bug. So you simply append a new release. This is important because every version you release should be identifyable. If you have 4 different "1.0.0" versions, it's hard to manage. Releases are often seen for MODs that are submitted to the MODDB. If something very small is found, it's resubmitted as 1.0.0a. And if another thing is found, 1.0.0b, 1.0.0c, and so on.
The release is an alphabetic character. It's limited, since the alphabet only goes until z, but if you have to release 26 new release versions you did something wrong.
Development
A project usually starts at version 0.0.0. At that stage, there is no code yet. Now, the development versions can be handled differently, since it's not really defined how the versioning is before the first release. Here are some ideas:
0.0.z is used for alpha releases, 0.x.z is used for the betas. Or you only have betas, so you have 0.0.1, 0.0.2, 0.0.3 for all your beta releases, and if you have a bigger change, you increase the minor number. It's up to you, really.
Once you released the initial version, there are some guidelines. 1.0.0 is the first stable release, so the next version (for development) is 1.1.0. This is instable, and when finished, it's released as 1.2.0. Here there is a special way for handling alpha and beta releases, that was used by phpBB for phpBB 3.0. For alpha releases, you have (x).(y).A(n), so as an example: 3.0.A1, 3.0.A2, 3.0.A3. For beta releases it's the same, just with a B. 3.0.B1, 3.0.B2. Now the development versions (minor number is odd) are never packaged, so for MODs, it doesn't matter if you actually have such a version. Just make sure that all your major versions are even.
Note: The dots between the versions are not decimal dots, they separate the versions. So after 1.0.9 comes 1.0.10, not 1.1.0.