The 18 certificate is issued by the British Board of Film Classification (BBFC), to state that in its opinion, a film, video recording, or game should not be seen in a cinema or purchased by a person under 18 years old.
As with other British film certificates, the 18 certificate theoretically only has advisory power for films shown in public cinemas, with the ultimate say being held by local authorities. In practice, the local authorities tend to follow BBFC rulings in all but a few exceptional cases.
For video and game sales, the BBFC rulings have statutory power, as under the terms of the 1984 Video Recordings Act all videos sold or distributed within the UK must be given a certificate by the BBFC, unless they fall into one of a number of exempt categories. Uncertificated recordings which are not exempt cannot legally be sold, regardless of content.
The 18 certificate was created in 1982 as the successor of the previous X certificate, which in turn was the successor of the H certificate (with H standing for "horror"). See History of British Film Certificates for more details.