Why do we need semantic versioning?
It all started with dependencies. Due to a system having more and more dependencies integrated which in turn have their own dependencies, a special state called ‘dependency hell’ is achieved by the system.
Updating a single package became a nightmare and so handling all dependencies updates requires a standard notation for packages version. That notation is not arbitrary and has a meaning, hence the term ‘semantic’.
Structure
The structure is in the format x.y.z where x,y,z are numbers or MAJOR.MINOR.PATCH. Semantically x represents a MAJOR update with incompatible public API changes. Y represents a MINOR update, an update with new functionality added in a backward-compatible manner. And z represents a PATCH update, an update that fixes bugs in a backward-compatible manner.
In a nutshell, everything that breaks the API needs a MAJOR update. A new compatible feature triggers a MINOR and a compatible bugfix triggers a PATCH update.
Initially, a project starts with a 0.y.z, signifying that the API is not stable.
For more details check this article: semver.org.