This is the link to the British Home Office Certificate Ordering Service - http://www.gro.gov.uk/gro/content/certificates/
Certificates can be ordered online once the person ordering has registered their details. The certificates are posted out and arrive within a couple of weeks.
Certificates can also be ordered by post if people prefer. The required form can be downloaded from this site.
When ordering certificates the GRO index reference is required
This page - http://www.gro.gov.uk/gro/content/certificates/most_customers_want_to_know.asp#FamilyHistory - provides information about GRO indexes.
Generally the information required for the certificate can be located via a search on Ancestry and probably Find My Past.
First step then is to locate the entry for the event (birth, death or marriage) in Ancestry.com and then go to the Home Office website to order the certificate.
Free BMD - http://www.freebmd.org.uk/ - is another site that can be searched for the GRO information.
In the distant past public records were available from Somerset House. A page on the Somerset House website provides information about agencies to contact for obtaining Wills and Divorce and Adoption information.