Answer:
Depending on what war you are talking about they used similar tactics.
Step-by-step explanation:
In World War One the German Empire used unrestricted submarine warfare to stop any shipping goods between the US and the United States. Anti-Submarine equipment had not been developed so the chances of ramming a U-boat were not likely, nor destroying it when it surfaced.
In World War Two, Nazi Germany used U-boats as well to stop America's "lend-leasing" policy that gave resources and munitions to allied nations. As technology was more advance, submarine tactics were made to destroy American cargo ships efficiently without the loss of U-boats from allied escort ships. One infamous tactic, for example, was the "wolfpack tactic" in which multiple U-boats attacked multiple cargo ships in the dead of night after trailing them the whole day.