The Foreign and Commonwealth Office, and its worldwide network of Embassies, High Commissions and Consulates, can provide help and information to British nationals arrested overseas. 

Further information can be found in this guidance: https://www.gov.uk/government/publications/arrest-or-detention/arrested-abroad-advice-for-british-nationals

And information about specific countries can be found here: https://www.gov.uk/help-if-you-are-arrested-abroad/y