Do you mean customs or immigration? They are two different things (immigration - deals with passports/visas/entry into the country, customs - deals with the items/gifts you are bringing into the country in your luggage).
Having said that though, you will go through both in the same place - when you enter the country, so if your port of entry into the UK is in London, you will go through them in London. The flight from London to Edinburgh will just be the same as a domestic flight between US cities in terms of procedures.