State-run grammar schools in the UK fall into three categories:
1. Those in Kent and Buckinghamshire 2. Those in Northern Ireland 3. Those everywhere else

1. I don't know much about these places, but from what I have heard, they are much like in the rest of the country - children sit an intelligence test. It is possible that these counties operate a system just like the rest of the country, but people just complain about these counties more. More information forthcoming as and when it comes in.

2. Northern Ireland
In the province, all children are required to take the 11+ exam, which determines whether they go to a grammar school or a secondary modern. This is an academic exam that encompasses all subjects. This system used to operate in the whole UK, but was phased out everywhere else. Secondary moderns in the rest of the UK were noted for basically being there to keep kids occupied until they were considered old enough to feed the capitalist beast. There was the option of a technical school, but these were never very prevalent, and I can't comment on how meaningful an education they offered.

3. Everywhere else
Grammar Schools in the rest of the UK are allowed by special dispensation to select their entire intake, by any means they see fit, but usually by an intelligence test.

Note also that not all grammar schools are local-authority or lea run - the UK education system allows various degrees of autonomy, and grammar schools tend to like to opt for the greatest level possible.

Grammar schools tend to be highly-desired places to send children, as they get good exam results. Some people suspect that they manage this by only taking the most intelligent children. There is reason to believe, however, that it is also caused by other factors. The fact that they can target their education at a much narrower range of ability than comprehensives, which may bring economic gains, is one such reason. The other is that those which can cream off the best pupils (and not all can) can also pick the best teachers, as teachers like to teach in these places, as discpline problems tend to be low, and the kids non-too-stupid.

Not all grammar schools can, realistically, cream off the best pupils, as in areas where there are many grammar schools, the brighter children will tend to be drawn to the school with the best results. The reason why grammar schools tend not to have discipline problems are largely that they, by their nature, select against the kinds of children who will be more problematic: Those who are turned off by education, and don't care, or who come from a background that doesn't value education, will not sit the test. These children also tend to come from a more middle-class background, with all that that implies.