Most of Germany's oil came from the Ploesti oilfields in Romania until they were overrun by the Russians in 1944. Other than that, Germany manufactured synthetic oil and rubber from their vast reserves of coal. The synthetic oil refineries were obviously one of the main targets for the Allies during the bombing campaign. Germany ususally repaired their refineries within a week or two, although they became overwhelmed during the second half of 1944 once Ploesti had been captured. That's why Germany ran out of fuel during the Ardennes Offensive and the Battle of Berlin.
Fuel for the Afrika Korps was shipped in convoy from Italy and Greece. However, once the Allies gained control of the air and sea in the Med., only one in four Axis ships reached North African ports and the convoys had to be suspended, resulting in Rommel running out of fuel too.