The definition is technically based on whatever that producer or labeller of code defines. One company/project definition doesnt have to match another.
But it usually has to do with mileage. At some point you declare that you are stopping the addition of features and heading for release. Then during your testing at some point the bug report rate takes a turn downward, you then promote that product to more people alpha, beta, release candidate, etc. More people more testers, more potential bugs. over time that product matures, the user base increases and the bug rate eventually slows down. When it reaches a point where you consider it to have the features you wanted, it works, and the bug rate is low enough you declare it to be stable and if not already move more resources off of that version/product and focus on the next one.
The metric will generally have to do with bug rates, how many bugs, how much time you spend on customer/user support. When the users stop bugging you about the product it is because: 1) they stopped using it 2) they keep using it but it has matured to the point where it is stable enough for them to use without complaining.