If you are organising a National exam there are a number of ways of organising it.
The first way, you mark it and then say the top 10% get an A, next 10% a B and so on. This is basically a quota system. GCSEs and A levels don't do that.
The second way, you say that anyone who can (for example) solve a quadratic gets an A, so if you reach the standard you get the grade, like music exams. GCSEs and A levels are not marked like this.
The way they are marked is that each year group of students sits what is basically an IQ test on year 7. So the exam boards know whether that year is generally brighter or less bright than other years.
They write the exam paper, and students sit the exam paper. They then look at the grade boundaries. If the paper is an easier paper (the year group have higher marks than previous year groups) grade boundaries will go up so that roughly comparable numbers of students get As, Bs, etc. they use the IQ data as a check.
In practice, grade boundaries do not tend to change that much in big entry subjects, which is why people sometimes say E.g. circle theorems is a grade 9 question.