For the free Ordnance Survey data, go to http://www.ordnancesurvey.co.uk/business-and-government/products/opendata-products.html. Click on the big button at the top labelled "Order Now". On the new page, scroll down until you see Boundary Line. Each dataset has a number of check boxes for ordering options. Boundary line is only offered for the whole of the Great Britain so you only get two check boxes. The one on the left is to order on DVD and the one on the right is to download. I'd recommend the download option. Check the box then scroll to the bottom and click the big blue button marked "Next". On the next page fill in your details and then click "Continue". You will then get an email with the download link.
The coastline in the OS Boundary-Line data is a high-res representation of the mean high water. However, it is a polyline. Do not try to convert this to a polygon. Britain is composed of a convoluted coastline and thousands of satellite islands, peninsulas and rocky out-crops. This means that even a seriously powerful computer is likely to fail to stitch the polyline into a set of polygons (I know because I've tried!). Use one of the political boundary maps instead and dissolve all the polygons to get just the coast.
A great alternative is either the OSM data already mentioned in another reply or the GSHHG shorelines dataset (formerly known as GSHHS). This is global but comes in a series of resolutions. It is a big download though.