Ancestors in the British Army
The WW1 section of this info is duplicated from the Researching Your Military Ancestors page
The Army campaign medal cards for WW1 are now online (less some info lost in WW2) so if you happen to know your ancestor's name and regimental number or unit, or he/she had an unusual name, you may be able to track them down. This link takes you to the search page
If you get a result, you'll find information about which unit(s) your ancestor served with.
You can buy a copy of the medal card online, but the info given is pretty sparse ......
image copyright the National Archives
Once you have that info (free to personal visitors to the NA at Kew), you can then get the relevant medal books which have more information.
You'll need a reader's ID card, so take some ID when you go. There are links telling you how to do it, and what you'll need on the National Archives wiki page.
However, if your ancestor wasn't awarded a campaign medal, they won't be in there.
Any records after 1920 are retained by the Army. It is possible to get them through the APC at Glasgow (more info required here, anyone tried it?) but you'll need things like Next Of Kin (NOK) forms as there are obviously personal confidentiality issues.
If your relative was killed, try the CWGC wiki page for more information.
Sources for All Eras
An excellent site is Land Forces of Britain, the Empire & Commonwealth which gives plenty of links and historical information on the lineage of Units. If you know which present unit your ancestor's regiment became, you may be able to contact them to see if they have any records. Their Regimental Museum may also be helpful.
For more detailed information on researching an individual unit, see the links below:
Military Family Research
There is a consolidated page on this Wiki - found at Family Research.