The Germans were able to get their U-boats into the Black Sea by taking advantage of the fact that Turkey, which controlled the Bosphorus Strait, was neutral in the early part of the war. The Germans also used a ruse to get their submarines through the strait. They disguised the U-boats as merchant ships and sailed them through the strait at night.
Once in the Black Sea, the U-boats wreaked havoc on Soviet shipping. They sank hundreds of Soviet ships, including many that were carrying vital supplies for the Soviet war effort. The U-boats also attacked Soviet ports and naval bases.
The Soviet Navy was not able to stop the U-boats from entering the Black Sea, but it did manage to sink a number of them. In the end, the Germans were forced to withdraw their U-boats from the Black Sea in 1944, when Turkey joined the Allies.