Do you have to go through customs when traveling between London and Frankfurt, and vice versa?
There is no customs between the UK and Germany as both countries are (currently still) part of the EU.
There is however passport control, as Germany is part of the Schengen Area but the UK is not. The airline will need to know your passport details as they are required to report these by the UK government, this is usually done on-line and you cannot check in until you have entered your passport details. Your passport will be checked by the airline. On landing in Germany you will have a passport check for entering the Schengen Area, and if you have a non-EU/Schengen passport it will be stamped.
Vice-versa you will have an exit passport check at Frankfurt and an entry one at London.
So, leave extra time. The lines at passport control can be long.
Thanks! I appreciate the replies. This was very helpful.
leave extra time
I would be leery about committing to a non-refundable rail ticket when arriving by air, even just from London, not due to immigration delays but due to flight delays. I have always been out to one of the rail stations within an hour of actually landing in Frankfurt.