You'll have to go through passport control. You clear customs in Germany. You'll walk through a nothing to declare lane to get to the airport in Copenhagen, but normally you won't be stopped. If you have to have a Schengen visa to visit Denmark and Germany, it will not affect customs, but they may ask more/different questions going through passport control. You can catch the train to the city below the terminal. It takes 12 to 14 minutes to get to the city from the airport. Buy tickets in the terminal before you go down to the tracks; a 3 zone ticket will cost you 36,00 kr each way. Make sure that you get back to the airport in time to get through security and make it to your gate for the flight to Germany.