The best place to start your search is The National Archives (TNA) previously known as the Public Records Office (PRO). This is housed just off London's South Circular, at Kew, in a modern building with a cafeteria and reading room in which to study.
Continuous paper evidence starts from about 1750. If you know your ancestor was a soldier or sailor from an earlier era, then TNA holds medical records and discharge papers that may tell you when your relative joined his ship or regiment, where he served, when he was discharged or how he died in service.
If you're lucky, unit war diaries or a ship's log may mention your relative by name. But, in any case, TNA staff are very helpful in guiding you towards the records you will need. They also hold all records relating to the award of gallantry and campaign medals.