Quality is a measure of how well a product serves its consumers.
If the consumer is a machine, then quality is likely very quantifiable and measurable. Issues like duty life, certified correct answers to anticipated questions, lack of defect, timing, etc are all relatively straightforward to measure for many cases, if hard to guarantee generally (but that's engineering).
If the consumer is a human or a human business, then quality starts well before product development, and will be measured in the pirate metrics (AAARR), and can be measured by a series of experiments on the working system, such as registering uses of features, customer ratings, monitoring social networks, usability studies, alpha test cycles, A/B testing of features, etc.
The development process can likewise be measured to see how well it serves its participants, such as with timely delivery, sustainable pace, non-turbulent flow of product, innovation, simplicity, component defect testing, product feature testing, and trending of productivity over time. These are all hard enough to do, but there is a lot of research.
Are we talking about software projects? There are volumes written, and many products for testing the quality of software (complexity, duplication, memory use, defect density, churn, and on and on).